A while ago we were designing our signup flow for our system. Basically, the green day scenario for our signup flow would be:
- User on our sign-up page enters their email address to initiate account creation.
- The user submits that email and then the system sends out an email to the entered inbox.
- In the email, there would exist a link that the user is prompted to click that implicitly verifies that the email exists.
- The user navigates to the link provided in the email and is prompted to enter their desired user password.
This is a common flow that many companies use in their signup procedure. Nothing special here.
Now whilst working on the implantation of this flow I found myself making countless fake email addresses so that I could make sure that my implementation changes did not inherently break anything. In the end I ended up mocking out the email provider when doing tests so I no longer had to worry about this.
Soon, mocking out the email provider would prove to be inadequate for testing the signup flow. We had to design our email template that would include our verification link and it would look like a pretty version that said something like: “Hi please click on this link to verify your account: <link-here>” with nice styling and layout. So off the designers went sending in all the minor changes to the email template, and with every change we had to test to make sure that the output was as expected. It turns out that implementing email templates is nasty. So, every time we made a change to our template we would want to test the template by trying to sign up with a new account. We went back to creating new fake emails on Gmail forever minor change we did to the template and this was getting cumbersome. Low and behold I was tipped off by someone that the best way to do this sort of testing is to just enumerate through the email account by inserting periods to the local-part of the email. Allowing you to only need one test email that can be used to sign up to your system multiple times. Let me explain:
In Gmail: you can have the email account firstname.lastname@example.org. This account is equivalent to email@example.com in the eyes of Gmail. It is also equivalent to firstname.lastname@example.org and so on and so on. We can enumerate many “new” accounts using one actual email account using this feature of Gmail.
In practice this means I only need one email account on Gmail, however when I signup using email@example.com, the email will inevitably end up in my firstname.lastname@example.org inbox. Same thing goes for email@example.com and firstname.lastname@example.org etc etc you get the picture.
This is quite neato and can speed up the process of doing visual tests on what the email templates of your no-reply emails look like.
Very sorry for the person with the account email@example.com, the web crawlers are going to have a field day here.