QA InfoTech » Automation Testing » Taking the first step towards test automation

Taking the first step towards test automation

Test automation is an important activity today in a quality effort. Testers who are not conversant with automation are inevitably on their path to learning it, either officially or on the job, as automation is one of core ways to bring in predictability, reliability, fast time to market, cost efficiency amongst other benefits in today’s software development landscape. This is seen as the most logical next step for testers to equip themselves with, if they are not in it already.

However, one of the most natural questions non-automation testers have is where do we start with, in test automation? Especially if the tester is not privy to coding, the inhibitions are even higher. In our recent test conference at QA InfoTech, there were a lot of interesting sessions on test automation – one which especially caught our attention is where one should start?. The crux of that discussion was around, starting with writing test scenarios as feature files. Feature files are very simple to implement and easy to understand as they are often based on a GWT (given when then) clause – this makes it easy for even non testers to understand what is happening in an end user like language. And from an automation angle, Cucumber, an acceptance test tool based on behaviour driven framework (BDD) consumes such feature files to then work with Selenium amongst other test automation frameworks. Here is a very simple example adapted from softwaretestinghelp.com on how feature files work:

Sample feature file:

Feature: Login Functionality Feature

In order to ensure Login Functionality works,
I want to run the cucumber test to verify it is working

Scenario: Login Functionality

Given user navigates to xyz.com
When user logs in using Username as “USER” and Password “PASSWORD”
Then login should be successful

Scenario: Login Functionality

Given user navigates to xyz.com

When user logs in using Username as “USER1” and Password “PASSWORD1”
Then error message should be thrown

Cucumber has a lot more commands which are very intuitive and easy to learn to then go hand in hand for automation with Selenium and other automation frameworks. As a first step testers should definitely look at writing tests as feature files as it is not only easy but also in the right direction to building a robust automation suite

Sharing is caring!

About the Author

Avatar QA InfoTech
Established in 2003, with less than five testing experts, QA InfoTech has grown leaps and bounds with three QA Centers of Excellence globally; two of which are located in the hub of IT activity in India, Noida, and the other, our affiliate QA InfoTech Inc Michigan USA. In 2010 and 2011, QA InfoTech has been ranked in the top 100 places to work for in India.