Sometimes, you need a bunch of email addresses for testing purposes. Perhaps you need to test a login or registration page, or perhaps your application sends emails to many different people.
You could create many real email accounts for your tests. But sometimes there's an easier way. Sometimes you can use a single email account instead, and just use variants of a single email address.
In many email systems, anything after the plus sign in the local part of the email address is ignored. So, all of these are delivered to the same mailbox:
In gmail, periods within your gmail address are ignored. So, all of these are delivered to the same mailbox:
Note that consecutive periods like foo..firstname.lastname@example.org are fine for gmail, but are generally considered invalid and hence undeliverable by most email sending systems. copyrightjoestrazzere
Only in gmail, both of these are delivered to the same address:
These methods will usually allow you to register many times on your system-under-test with emails that will be considered different, but will actually deliver to the same account. And you can usually filter these incoming emails to keep them separate from your other emails if needed.
This article originally appeared in my blog: All Things Quality
|My name is Joe Strazzere and I'm currently a Director of Quality Assurance. |
I like to lead, to test, and occasionally to write about leading and testing.
Find me at http://strazzere.blogspot.com/.