Connect with us

Testing Tools

How to Write Email Validation Test Cases


, on

This tutorial will show you how to create email validation test cases. Many applications will collect your email ID. You can purchase tickets, schedule an appointment, and book online on eCommerce sites. All testers should be able to create validation scenarios for email addresses.

The email field is where you send a message to someone. The subject usually includes the sender’s name and the receiver’s. This field can also be used to write other messages or images.

Before we can start our test case, it is important to establish the Acceptance Criteria

What is the Acceptance Criteria in email address validation cases?

We must have functional requirements, as we discussed in requirements post. Let’s define them.

Description: The user must be able enter their email id when they register their account.

Abbreviated Acceptance Criteria

What are the test cases for email address validation?

Positive Scenarios:

  1. Verify the input field accepts a valid email address. Some examples:
    5. example@
    6. example@[]
    7. “example”
    15. Valid Email Addresses that appear at glance to be invalid
    16. extremely.”odd\unusual”
    17. extremely.unusual.”@”
    18. very.”(),:;<>[]”.VERY.”very@\\ “very”
  2. Verify email id can contain a dot in the address field.
  3. Verify email id can contain a dot in the subdomain field.
  4. Verify email id can contain a plus sign.
  5. Verify email id can contain an IP address in square bracket.
  6. Verify email id can contain quotes.
  7. Verify email id can contain digits.
  8. Verify email id can contain an underscore.
  9. Verify email id with a valid top-level domain name is valid.
  10. Verify top-level domain can contain a dot.
  11. Verify email id with a dash is considered valid.

Negative Scenarios:

As with all test scenarios, there do exist some negative scenarios you will want to verify. Namely:

  1. Verify an email id cannot exceed 254 characters.
  2. Verify the missing @ symbol in the email id field.
  3. Verify the missing domain in the email id field.
  4. Verify gibberish or garbage is not accepted in the email id text box.
  5. Verify the missing username in the email id field.
  6. Verify encoded HTML within the email id field is invalid.
  7. Verify leading dot in the email id text box is invalid.
  8. Verify trailing dot in the email id text box is invalid.
  9. Verify multiple dots in the email field.
  10. Verify unicode char in the address in the email text box.
  11. Verify invalid IP address format in the email text box.
  12. Verify multiple dots in the domain is invalid.
  13. Verify invalid email addresses like these:
    1. plaintext address
    2. @#@@##@%^%#$@#$
    4. John Doe <>
    9. example…
    10. おえあいう
    11. (John Doe)
    12. example@email
    14. example@email.web
    15. example@111.222.333.44444
    16. example@email…com
    17. CAT…
    18. ”(),:;<>[\]
    19. obviously”not”
    20. example\ is”especially”not\

Test Diminishing Returns

Remember that testing has diminishing returns and developers should use a well-tested library or regex to test this functionality. These are just a few tests that people might want to run but they are not necessary.

  1. Too many symbols (@). must be verified
  2. Verify all domains at the top.
  3. Verify that there are no top-level domains.

As a tester, it’s important to discuss with the developer what the library code does and doesn’t do. This will help you target your testing efforts for testing email addresses.


What is the validation for email?

Email validation is a method to determine if an email address can be reached and is valid. It quickly detects typos and determines whether they are genuine errors or intentional misdirection. It checks whether an email address is associated to a trusted domain.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *