Reputation: 825
I am automating an application using selenium webdriver which sends the email alerts on clicking on a particular button. So I need a dedicated email system which will receive the emails and we can use its APis or some other feature which can be used to verify whether the mail was actually sent and we can also verify the mail content.
Upvotes: 1
Views: 1744
Reputation: 5113
I'd recommend GreenMail:
GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes.
Typical use cases include mail integration testing or a lightweight sand boxed mail server for development.
- Supports SMTP, POP3 and IMAP including SSL
- Prevents accidental email leaking to real mail servers
- Provides different deployment models, such as WAR module or JBoss GreenMail Service
- Easily embeddable in JUnit tests for integration testing
- Lightweight with few dependencies
GreenMail is the first and only library that offers a test framework for both receiving and retrieving emails from Java.
Upvotes: 2
Reputation: 41
You can use Mailinator service, it is free if you just want to navigate the emails. However it also provides the API for dev purposes but its paid.
Upvotes: 2
Reputation: 825
I did a bit R&D and found a solution. The solution is using the Gmail API. Below is a link for more description and clarification- EMAIL VERIFICATION FROM GMAIL ACCOUNT IN SELENIUM WEBDRIVER (JAVA)
This looks like a good solution, But I am still looking for the best approach. Kindly let me know if a dedication email platform really exist for testing purpose.
Upvotes: 1