how to automated test a web application with sending e mail feature
TRANSCRIPT
![Page 1: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/1.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/2.jpg)
Target Application
![Page 3: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/3.jpg)
"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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/4.jpg)
![Page 5: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/5.jpg)
Automated Testing Environment
![Page 6: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/6.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/7.jpg)
![Page 8: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/8.jpg)
But, thease libraries are not main
theme of this slides...
![Page 9: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/9.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/10.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/11.jpg)
Answer:
"Black Jumbo Dog"
![Page 12: How to automated test a web application with sending e mail feature](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/12.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/13.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/14.jpg)
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](https://reader031.vdocuments.site/reader031/viewer/2022020110/556a54dfd8b42a7a138b49e9/html5/thumbnails/15.jpg)
Resources
Black Jumbo Dog
http://blackjumbodog.codeplex.com/
Sample Code
https://github.com/sample-by-jsakamoto/How-to-test-webapp-with-BJD