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:
- foo.bar@gmail.com
- foo.bar+123@gmail.com
- foo.bar+234@gmail.com
- foo.bar+test1@gmail.com
- foo.bar+regression.test.11.29.2011@gmail.com
In gmail, periods within your gmail address are ignored. So, all of these are delivered to the same mailbox:
- foobar@gmail.com
- foo.bar@gmail.com
- f.o.o.b.a.r@gmail.com
Note that consecutive periods like foo..bar@gmail.com 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:
- foo.bar@gmail.com
- foo.bar@googlemail.com
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.
see also:
see also:
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/. |