To E2E Testing
To E2E Testing
TO E2E TESTING
using Web Driver IO, Mocha, Should and Selenium
2. Background
3. Objectives
4. Technologies
5. Architecture
6. Several Examples
7. Testing Possibilities
8. Demo
10. Installation
11. Conclusion
INTRODUCTION
Tony Keith - Independent Consultant
www.tlkeith.com
• Many titles and many years of experience but no automated Q/A experience.
• This was really two (2) separate challenges. The first was to research the technologies to use to
do the automated testing. The second was to train the Q/A department.
• This presentation will only address the technologies used and what I learned in the process.
• The technologies worked well but I really had to search for information and I spent many hours
figuring out issues. I had a hard time finding information on the Internet about these technologies
all working together.
• I wanted to share this information, along with working example test scripts and a test web site to
run the scripts against.
OBJECTIVES
Use Technologies That:
• Uses open source software only (except cloud based testing platforms)
• Mocha – test runner framework and executes the test scripts (runner)
• Selenium – browser abstraction and running factory (starts and communicates with browser)
• Grunt-WebDriverIO - plugin for Grunt with Mocha + Web Driver IO as test runner
• Submit form.
• $ mocha tutorial1.js
• $ mocha dataLoopExample2.js
• Tutorial: https://github.com/
onewithhammer/web-driver-io-tutorial
• My Blog: http://
webdriveriotutorial.blogspot.com/
INSTALLATION
• Assumptions: Node and Java are installed.
• Install Tutorial and required Software (mocha, should, web driver IO, grunt, grunt-webdriver):
• OR
• $ cd WebDriverIOTutorial
• $ mocha tutorial1.js
CONCLUSION
• I spent some time researching the technologies to use. I originally started with Selenium
Web Driver but switched to using Web Driver IO. Web Driver IO seemed to be easier
to use, better support and much easier to extend (at least the documentation for
extending - reusable commands was better).
• When I first started looking at the technologies it was hard to find good examples that
were relative to anything I was trying to do. This is the reason I wanted to share this
information and knowledge with you.
• These technologies worked much better than I expected however there was learning
curve involved. Once I understood how all the components worked together, I was able
to write complicated test scripts in a very short time. The most difficult scripts were JS
based components such as a date picker and modal selectors.
• I hope I educated you a little about E2E testing and provided enough information to
motivate you into looking at these technologies.
THANK YOU
Special thanks to Node.js Cincy Meetup for organizing
this meetup, The Brandery for allowing us to use this
awesome space and Modulus for providing the pizza
and beer.