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

15
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.

Upload: jun-ichi-sakamoto

Post on 31-May-2015

246 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: How to automated test a web application with sending e mail feature

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.

Page 2: How to automated test a web application with sending e mail feature

Target Application

Page 3: How to automated test a web application with sending e mail feature

"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.

Page 4: How to automated test a web application with sending e mail feature
Page 5: How to automated test a web application with sending e mail feature

Automated Testing Environment

Page 6: How to automated test a web application with sending e mail feature

Selenium2To remoting Web browser.

SpecFlowTo describe test scenario more readable

with "Gherkin" syntax, like the "Cucamber"

library on Ruby.

Page 7: How to automated test a web application with sending e mail feature
Page 8: How to automated test a web application with sending e mail feature

But, thease libraries are not main

theme of this slides...

Page 9: How to automated test a web application with sending e mail feature

Question:

How to assert the contents of

received e-mail from test code!?

Page 10: How to automated test a web application with sending e mail feature

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.

Page 11: How to automated test a web application with sending e mail feature

Answer:

"Black Jumbo Dog"

Page 12: How to automated test a web application with sending e mail feature

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.

Page 13: How to automated test a web application with sending e mail feature

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

Page 14: How to automated test a web application with sending e mail feature

NOTICE

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

But, the complete version is coming soon!

Page 15: How to automated test a web application with sending e mail feature

Resources

Black Jumbo Dog

http://blackjumbodog.codeplex.com/

Sample Code

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