Test data

Test data plays a critical role in checking how effectively a software is validated. Different input types behave differently across APIs, user interfaces, and integrations. This page brings together practical test data references for common input types such as booleans, dates, names, and URLs.

Use these examples to design realistic test scenarios, uncover edge cases, and improve overall test coverage.

Email Test Data

Email addresses are used everywhere—user registrations, login systems, notifications, password resets, and account verification. A small mistake in email validation can reject legitimate users, accept unusable addresses, or create integration problems. This guide explains how to test email values effectively.

1. Structure Validation

Structure validation ensures an email follows the expected local-part@domain format. Every email field should be tested with:

  • Standard email (user@example.com)
  • Missing @ (userexample.com)
  • Multiple @ symbols (user@@example.com)
  • Missing local part (@example.com)
  • Missing domain (user@)
  • Missing domain suffix (user@example)

These scenarios reveal whether the application correctly identifies the basic components of an email address.

2. Length and Boundary Validation

Email addresses have length-related boundaries that applications need to handle correctly. Boundary testing should include:

  • Single-character local part (a@example.com)
  • Very short email (a@b.co)
  • Local part approaching 64 characters
  • Local part exceeding 64 characters
  • Domain labels approaching 63 characters
  • Domain labels exceeding 63 characters
  • Total email length approaching the application's maximum
  • Email exceeding the application's maximum length

Boundary values often expose database truncation, incorrect validation rules, and differences between frontend and backend validation.

3. Local-Part Validation

The portion before @ can contain more variation than a typical email address suggests. Test scenarios include:

  • Letters (user@example.com)
  • Numbers (12345@example.com)
  • Dots (john.doe@example.com)
  • Hyphens (john-doe@example.com)
  • Underscores (john_doe@example.com)
  • Plus addressing (user+test@example.com)
  • Consecutive dots (john..doe@example.com)
  • Leading dot (.user@example.com)
  • Trailing dot (user.@example.com)

Some special-character forms may be valid under email standards but unsupported by a particular application. Testing them helps identify exactly what the system accepts.

4. Domain Validation

Domain validation verifies that the portion after @ follows the rules expected by the application.

Examples include:

  • Standard domain (user@example.com)
  • Subdomain (user@mail.example.com)
  • Multiple subdomains (user@a.b.c.example.com)
  • Hyphenated domain (user@my-domain.com)
  • Numeric domain label (user@123.example.com)
  • Consecutive dots (user@example..com)
  • Leading hyphen (user@-example.com)
  • Trailing hyphen (user@example-.com)

Domain testing helps uncover validation rules that accept malformed addresses or reject legitimate domain structures.

5. Case Validation

Email values may arrive with uppercase, lowercase, or mixed-case characters. Test scenarios include:

  • Lowercase (user@example.com)
  • Uppercase (USER@EXAMPLE.COM)
  • Mixed case (User.Name@Example.COM)
  • Same address submitted with different casing

Case testing is especially important when email addresses are used as account identifiers. A system should have a clear policy for comparison, storage, and duplicate detection.

6. Whitespace and Input Handling Validation

Email values can contain unexpected whitespace introduced by users, copied text, CSV files, or external systems.

Test scenarios include:

  • Leading space ( user@example.com)
  • Trailing space (user@example.com )
  • Spaces around the address (user@example.com)
  • Space before @ (user @example.com)
  • Space after @ (user@ example.com)
  • Space inside domain (user@example .com)
  • Tab or newline characters

These tests determine whether whitespace is rejected, automatically trimmed, or accidentally stored as part of the email address.

7. Empty and Null Validation

Email fields should also be tested when no meaningful value is supplied.

Examples include:

  • Empty string ('')
  • Whitespace-only value (' ')
  • Null (NULL)
  • Missing email key in JSON
  • Email key with empty value ('email': '')

The expected behavior depends on whether the email field is mandatory or optional. These scenarios should therefore be tested separately from malformed email addresses.

8. International and Character Validation

Modern applications may encounter email addresses and domains containing non-ASCII characters. Depending on application requirements, testing can include:

  • Accented characters (josé@example.com)
  • Unicode local part (用户@example.com)
  • Internationalized domain (user@例子.测试)
  • Emoji (user😀@example.com)
  • Unsupported symbols or control characters

The goal is not to assume every format should be accepted. It is to verify that the API behaves consistently with the application's supported email policy.

9. Business Logic Validation

An email can be structurally valid while still violating application-specific rules. Examples include:

  • Email already registered
  • Email not registered
  • Disposable email domain
  • Blocked domain
  • Only corporate emails allowed
  • Email domain not on an approved list
  • Duplicate email with different casing
  • Email belonging to an unverified account

These validations must be tested separately from email-format validation because they depend on application rules and existing data.

Applying This in Real API Testing

When APIs accept email values, these validations should be tested at both the request and response level. Each dataset should clearly indicate whether the email is expected to pass or fail and why. Testing standard values alone is rarely enough—boundary conditions, malformed structures, whitespace, domain variations, and business rules are where many validation issues appear.

Platforms like BusStop help testers run multiple email scenarios in one execution, validate responses without writing code, and turn those scenarios into reusable regression tests for future releases.