More often than not our applications need to send emails to users notifying for example that its account has been created, they have purchased an item, or simply password remaining. When you are writing unit tests there is no problem because probably you will be mocking up interface responsible of sending an email. But what's happen with integration tests?
Maybe the logical path to resolve this problem is installing an email server and execute these tests against it. It is not a bad idea, but note that you will need to configure your environment before executing your tests. Your tests will depend on external resources, and this is a bad idea for integration tests. Furthermore these integration tests would not be portable against multiple machines if an email server is not installed previously.
To avoid this problem Dumbster comes to save us. Dumbster is a fake smtp server designed for testing applications that send email messages. It is written in Java so you can start and stop it directly from your tests.
Edited by: Cameron McKenzie on Apr 10, 2012 8:10 AM