Skip to content

mhca/todo-ly-mailinator-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailinator: An alternative to test email-based use cases.

1. Introduction

Considering the following cases for "todo.ly" app:

  • Verify that a confirmation email is sent after creating a new user
  • Verify a change-password email is sent after user's request it

2. The problem

How to easily automate those test cases?

3. Some alternatives to solve the problem and its limitations

  1. Third party applications (gmail, outlook, etc.)

    • Need to automate UI steps
    • Emails considered as spam or email banned
  2. Setup a dedicated mail server

    • Additional effort/time invested
    • Some IT restrictions (have a dedicated machine/vm, enable ports and others)

4. Mailinator, an alternative to consider

Mailinator

5. Usage example (UI)

Let's try it out!

6. Usage example (API - postman)

Following end-points are available:

Limitations: we need to pay!

Fortunately, we found these public resources:

7. Automated example (API - nodejs script)

var emailName = 'share.knowledge';
request
  .get('https://www.mailinator.com/fetch_inbox?zone=public&to=' + emailName)
  .end(function(err, res){
    var inbox = res.body;				
    console.log('*** User\'s inbox: ', inbox);
  });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published