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. someone@gmail.com and someone+12345@gmail.com will deliver to the same someone@gmail.com inbox!
With that, I can generate gmail addresses and search the inbox by "to: someone+12345@gmail.com" to retrieve the email for the test.
No comments:
Post a Comment