how to automated test a web application with sending e mail feature

Post on 31-May-2015

246 Views

Category:

Technology

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

How to automated test

a Web application with

sending e-mail feature?* Not unit test, focus on "system test" by tester who is not developer.

Target Application

"Attendee Registration" Sample App.

Enter the name and e-mail address, and

click "Regist".

Then, the application send the

confirmation e-mail to entried address.

Automated Testing Environment

Selenium2To remoting Web browser.

SpecFlowTo describe test scenario more readable

with "Gherkin" syntax, like the "Cucamber"

library on Ruby.

But, thease libraries are not main

theme of this slides...

Question:

How to assert the contents of

received e-mail from test code!?

There is many applications to mocking

SMTP server, but...

They have NO WAY to interact with Test App...!

then, the test code can't validate the sent mails.

Answer:

"Black Jumbo Dog"

Black Jumbo Dog is...

Desktop application for Windows

written by C#

Open source, public at CodePlex.

It can be SMTP server.

Web API

It can speak HTTP to control SMTP server,

It can clean all received mails via Web API.

It can retrieve all received mails via Web API.

Test App

(MSTest)

Selenium

Web Browser

Target

Web Application

Black Jumbo Dog(for Mocking SMTP Server)

Remote Control

Response

Request

Send e-mail

- Clean up mails

- Retrieve mails

HTTP SMTP

HTTP

NOTICE

The Web API of "Black Jumbo Dog" is not stable today.

But, the complete version is coming soon!

Resources

Black Jumbo Dog

http://blackjumbodog.codeplex.com/

Sample Code

https://github.com/sample-by-jsakamoto/How-to-test-webapp-with-BJD

top related