Your email campaign that looks perfect on your screen, might actually be failing to render properly across mobile devices and other email clients.

Your emails are regularly exposed to countless possible rendering issues.

Therefore, you should write test cases for email.

Even better, you should include email testing as a part of your email marketing game plan.

Get 100 Verification For Free

If you don’t know how to write test cases for email, this is exactly what you will learn with us.

In this article, we tackle how to write email validation test cases.

What is validation in test cases?

Validation in test cases ensures quality in the email component as well as other system components.

Emails can be triggered by various scenarios.

That’s why you need to check your email’s components.

Like the email template, links/buttons in the email, From, To, Cc, Bcc fields, attachments, and content as per the email notification, and others.

How do you write test cases for validation?

Here are 10 tips for writing effective test cases.

  1. Write, To The Point Descriptions: keep the description simple and informative.
  2. Actively Use A Test Case Management Tool.
  3. Monitor All The Test Cases.
  4. Aim For 100% Test Coverage.
  5. Beware of Dependent Test Cases – You may have a test case X which will only be executed after performing test case Y and test case Z, sequentially. This scenario happens when two modules are non-mutually exclusive. Draft a scenario after figuring out the dependent test cases to not create bugs.
  6. Make use of automation testing – write ‘clean code’ to provide better maintainability and readability.
  7. Be Intent Specific: Acceptance criteria is imperative to writing effective test cases.
  8. Prioritize Your Test Cases Well.
  9. Stay In Your Lane – Don’t let an assumption of features and functionalities deviate you from actual requirements that were originally required by the client.
  10. Therefore, it is always better to develop a thorough understanding of the SRS (Software Requirement Specification) document.

How do I write a test case in Gmail?

  1. Check if emails can be sent from account A to account B (Gmail accounts)
  2. Check if emails can be sent from account A (Gmail) to account B (yahoo, etc)
  3. Check if emails can be sent from account A (yahoo, etc) to account B (Gmail)
  4. Check if you can attach files from your computer to the mail the draft: because this requires communication between your computer and Gmail app.

Test Cases For Email id Field validation

The email field is the area on a webpage where you can insert an email address or an email field.

The email field is the part of the email where we write a message to someone. It has the sender’s name and receiver as well as the subject.

Email fields are generally located at the end of the email.

Email field validation is one of the most critical tasks in any email sending application.

It ensures that each email that is sent to a particular user has an associated correct address, name, and other required information.

Positive Test Cases for the email id field

  • Verify the field by entering the valid email address.
  • Verify the field With Email contains a dot in the address field
  • Verify With Email contains dot with subdomain
  • Verify the email id filed With the Plus sign is considered a valid character.
  • Verify With the Square bracket around IP address is considered valid.
  • Verify the email id filed With Quotes around the email is considered valid
  • Verify email id field With Digits in the address are valid
  • Verify email id With Digits in the address are valid
  • Verify the email id filed With Underscore in the address field is valid
  • Verify the email id filed With .name is a valid Top Level Domain name
  • Verify With Dot in Top Level Domain name also considered valid (
  • Verify With Dash in address field is valid

Negative Test Cases for email id field

  • Verify the email id filed With Missing @ sign and domain
  • Verify the email id text box With Garbage
  • Verify the email id filed With Missing username
  • Verify the email address field With Encoded html within email is invalid
  • Verify the email id field With Missing @
  • Verify the email id filed With Two @ sign
  • Verify the email id text box With Leading dot in address is not allowed
  • Verify the email id filed With Trailing dot in address is not allowed
  • Verify email address field With Multiple dots
  • Verify the email id filed With Unicode char as address
  • Verify the email id text box With Text followed email is not allowed
  • Verify the email id text box With Missing top level domain (.com/.net/.org/etc)
  • Verify the email id filed With .web is not a valid top level domain
  • Verify the email id text box With Invalid IP format
  • Verify the email id text box With Multiple dot in the domain portion is invalid

How to write test cases for Registration & Login

  1. Verify by entering the Valid Username and Password on respective fields and click on login
  2. check by entering valid username and invalid password and click on login
  3. check by entering valid username and leave blank in password field and click on login
  4. verify by entering invalid username and invalid password and click on login
  5. verify by entering invalid username and valid password and click on login
  6. verify by entering valid username with space and valid password and click on login
  7. verify by entering blank username text field and valid password and click on login button

Invalid Test Cases Of Email IDs

Invalid Test Case

plain address

Reason

Missing @ sign and domain

Invalid Test Case

#@%^%#[email protected]#[email protected]#.com

Reason

Garbage

Invalid Test Case

@domain.com

Reason

Missing username

Invalid Test Case

Joe Smith <[email protected]>

Reason

Encoded html within an email is invalid

Invalid Test Case

email.domain.com

Reason

Missing @

Invalid Test Case

[email protected]@domain.com

Reason

Two @ sign

Invalid Test Case

.[email protected]

Reason

Leading dot in address is not allowed

Invalid Test Case

[email protected]domain.com

Reason

Trailing dot in address is not allowed

Invalid Test Case

email..[email protected]

Reason

Multiple dots

Invalid Test Case

あいうえお@domain.com

Get 100 Verification For Free

Reason

Unicode char as address

Invalid Test Case

[email protected] (Joe Smith)

Reason

Text followed email is not allowed

Invalid Test Case

[email protected]

Reason

Missing top-level domain (.com/.net/.org/etc)

Invalid Test Case

[email protected]domain.com

Reason

The leading dash in front of the domain is invalid

Invalid Test Case

[email protected]

Reason

.web is not a valid top-level domain

Invalid Test Case

[email protected]

Reason

Invalid IP format [email protected]

What are Acceptance Criteria for email address validation test cases?

Acceptance criteria is a condition that validates whether the software is working as intended with respect to the end-user.

Acceptance criteria is there to help you judge the intent of the end-user rather than the steps.

These are the steps to go through for the email address  validation test cases:

  1. Single email verification and Bulk email verification
  2. Syntax validation
  3. DNS Lookup (domain server verification)
  4. Check for unnecessary emails
  5. Inbox varify or mailbox check

After all these steps, if everything goes well, you will validate the email address.

This means that your email addresses are correct.

You can definitely run an email marketing campaign.

And if it shows invalid or risky then they have some kind of DNS or other problem, remove them from your email list.

Why do we need Email Testing?

Your recipients receive emails from Gmail, Yahoo, Outlook, and each of these clients will render your emails differently.

These variations can affect how your emails will be received.

If you’re not email testing effectively you might be losing market and business.

Email testing makes you able to analyze the results directly from your audience.

Your audience is telling you what they like and doesn’t like about your emails, and you are able to adjust your email campaigns accordingly.

Localization Scope for Emails testing

When the application supports multiple languages, then the support should extend to Emails as well.

All the Emails sent should be in the user-profile language.

If a user has set English as the profile language, then all the emails sent to him/her should be in English.

If the user’s profile language is French, then all the emails sent to him/her should be in French.

User profile language can be one-time settings or can be changed as and when required, which depends on the application’s settings.

Email should be sent in the language that the user has at the point it is triggered.

Common validation points for localization testing the Emails are as below:

Subject line

Body of the EmailContents – text of the body link name/button name copyright information customer support details

Standard/Customization of Emails

You can customize email at the backend.

For example, few applications support the user to customize Emails when they are being sent.

The user can change the Subject line and/or body of the email.

In this case, there are high chances that your emails can be intruded thorough your testing team has already done their testing.

You have to perform testing for injections – send HTML code, Java code, SQL, etc.

All these should fail in order to increase security levels.

If the application does not support customization of emails.

All the emails sent will follow the standard subject/body as set by an application.

If you’re looking for a great email validation service, you can try Email Inspector for free today. Get your first 100 email addresses checked by a professional and discover how many fake accounts you have on your list!

Get 100 Verification For Free