March 8, 2009

General Input Tests for Email Addresses


Here are some routine tests to try for an email address field.

To use these values, you should first have some idea about the mechanism being used in your system to validate the email addresses.  For example, many systems will attempt to validate email addresses when they are entered, but then follow up by attempting to send an email to the address.  If no such email address exists, the address is rejected. If this is the case in your system, then you may need to substitute real addresses for the valid email addresses which follow the described pattern.

Then decide which of the following are relevant for your input field and use them.

If you are using an automated test tool, these values can easily be used exhaustively, or randomly, by a test script.

Valid Email Addresses
Valid, but rejected by some sites
Invalid Email Addresses
Invalid, but accepted by some sites
See also:


Updates:

June 24, 2009 - Added link to page explaining length FAQs

April 5, 2009 - Added valid email containing several periods within.
Charles S van der Linden said "Multiple periods before the @ are allowed by many eg. john.van.der.tester@gmail.com  will work.   (gmail actually strips all the periods so that address maps to the same thing without the periods before the @ sign)."

March 25, 2009 - Added invalid email with a trailing period.
Heather Noggle said "I always also validate to be sure e-mail addresses don't end with a dot. A lot of people copy e-mail addresses out of text, and the e-mail address in that text is followed by a period to make sense in normal written English.  Lots of non-savvy computer users will just go ahead and copy that dot if they're not directly clicking through."