Web Automation in 15Min with Watir-Webdriver and Cucumber (v2)
Code for this project is on Github at:
After receiving some questions on my previous video:
I decided to make a new version and go through some of the questions received and cover various topics on BDD, Cucumber and Ruby. This is the foundation of the next two videos I’ll upload on Jenkins and Selenium Server.
This particular video builds out a rough skeleton to automate a specific browser (Firefox) to run searches in Amazon and validate the results. By following this tutorial and looking up documentation on watir-webdriver a person can easily build on this to make a very robust web automation suite.
What’s even better, is that your automation framework will be compatible with a variety of browsers (but you’ll need to put the browser webdrivers on your file path.) By default it works out of the box for Firefox. For IE and Chrome you’ll need to get those webdrivers (see below.)
For more information, please see my website which covers a variety of automation subjects:
I worked at eHarmony were we used a Groovy based solution that took multiple people, several months – in the end it still wasn’t viable and had issues with browser compatibility. At my current position, I was able to build the framework skeleton before I went home on my first day at work. This framework is compatible with Firefox, IE and Chrome out of the box. With a little set up, Safari can also be plugged in as well (which I’ll go over in a future video.)
On top of all that, Cucumber has a great plugin for Jenkins CI – so if you have a web app that is built by Jenkins CI, Jenkins can kick off the cucumber tests after the deployment of the app. The Cucumber plugin has a nice reporting system – which I’ll go over in a future video – and I documented it on my website: