Valid or invalid format of email address in software testing

Valid or Invalid Email format Validation
Valid or Invalid Email format Validation

Email Address is the basic field for all the web apps or mobile apps as it is an essential part of registration. As a tester, we have to check all the email addresses that can be possible. So here is a list of some of the valid and invalid email address which will help the testers to check if the email is valid or not.

The basic format of an e-mail address is- local-part@domain-part (max. 64@255 characters, no more 256 in total).

The Name-part and domain-part could have the different set of permitted characters, but that’s not all, as there are more rules to it.

Valid Name Part in Email Address with Example

Valid Domain Part in Email Address with Example

Valid Email Address format with Example

Invalid Email Address format with Example

Valid Name Part in Email Address with Example:

  1. lowercase Latin letters: abcdefghijklmnopqrstuvwxyz,
  2. uppercase Latin letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ,
  3. digits: 0123456789,
  4. special characters: !#$%&’*+-/=?^_{|}~,
  5. dot: . (not first or last character or repeated unless quoted).
  6. space punctuation such as: "(),:;<>@[\] (with some restrictions).
  7. comments: () (are allowed within parentheses, e.g. (comment)xyz@example.com).

Valid Domain Part in Email Address with Example:

  1. lowercase Latin letters: abcdefghijklmnopqrstuvwxyz,
  2. uppercase Latin letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ,
  3. digits: 0123456789,
  4. hyphen: - (not first or last character),
  5. can contain IP address surrounded by square brackets: test@[192.168.2.4] or test@[IPv6:2018:db8::1].

Valid Email Address format with Example:

  1. test@domain.com
  2. lastname@domain.com
  3. test.email.with+symbol@domain.com
  4. id-with-dash@domain.com
  5. a@domain.com (one-letter local part)
  6. "abc.test email"@domain.com
  7. "xyz.test.@.test.com"@domain.com
  8. "abc.(),:;<>[]\".EMAIL.\"email@\ \"email\".test"@strange.domain.com
  9. example-abc@abc-domain.com
  10. admin@mailserver1 (local domain name with no top-level domain)
  11. #!$%&'*+-/=?^_{}|~@domain.org
  12. “()<>[]:,;@\\”!#$%&’-/=?^_`{}| ~.a”@domain.org
  13. ” “@domain.org (space between the quotes)
  14. example@localhost (sent from localhost)
  15. example@s.solutions
  16. test@com
  17. test@localserver
  18. test@[IPv6:2018:db8::1]

Invalid Email Address format with Example:

  1. example.com (no @ character)
  2. A@b@c@domain.com (only one @ is allowed outside quotation marks)
  3. a”b(c)d,e:f;gi[j\k]l@domain.com (none of the special characters in this local part are allowed outside quotation marks).
  4. abc”test”email@domain.com (quoted strings must be dot separated or the only element making up the local part).
  5. abc is”not\valid@domain.com (spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a backslash).
  6. abc\ is\”not\valid@domain.com (even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained in quotes).
  7. .test@domain.com (double dot before @); (with caveat: Gmail lets this through).
  8. test@domain..com (double dot after @).
  9. a valid address with a leading space.
  10. a valid address with a trailing space.