3

In short: are email end-to-end tests a thing?

As part of my CI I would like to run email integration/end-to-end tests: the app would send it to some SMTP server and then hits maybe an endpoint where it would check if SMTP server got the email. I have hard time finding anything similar on the net though... Did you hear about something like that, or maybe it just doesn't make any sense to test something like that? Emails notifications are crucial in our app, maybe there are some other ways to make sure that they work (we do have unit tests)?

The SMTP server is Postfix, the app is built with Python/Pyramid.

8

Yes, it makes sense to test emails like that, especially if they are a crucial component of your system. Of course, a failed test could still mean that there is nothing wrong with the application but your mail server is at fault.

I found a related question on our sister site Software Quality Assurance & Testing: Automating verification of sent EMAIL/SMS messages. The answer there by user Niels van Reijmersdal says:

For (automated) testing of email content I have used mailtrap.io in the past.

I think you can use ClickSend for receiving SMS (and email) messages.

Both have an API to send/receive and parse messages send to their service. So you should be able to programmatically test that SMS/Email is send/received and check the content.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.