We're often get asked how to validate confirmation emails and their content.

In many cases you will need to send email from your application to a user as part of your flow. You then want to have the ability to test that the email was received.

Entering a local email account, google account or similar is not an option for test automation. 

How to test it

In such cases we recommend to use online email services, who provide us with temporary email addresses. There are many services like Mailinator or Guerrilamail.  

After you send an email from your AUT to the email address as provided by the service you choose, you can navigate to that service and check that the email was received and also use text validations to make sure the content is as expected.  

Did this answer your question?