Friday, August 30, 2019

gmail's plus sign trick

I am working on a test for the user registration on my website.  problem is I need to create a new account every time and that ties to the user's email address (gmail).  I couldn't create a new email account every time I ran the test.  Not only will I create a lot of email accounts (even if I can automate that) but also enabling API for each new account would have a lot of work.

Turns out there's a plus sign trick that can have a seemingly different email address send to the same email account. and will deliver to the same inbox!

With that, I can generate gmail addresses and search the inbox by "to:" to retrieve the email for the test.

No comments:

Post a Comment