Steps to Automate Regression Testing:
- Prepare Test Cases.
- Convert Test Cases to Scenario’s.
- Prepare Step definition for the Scenario.
- Execute the Script.
Our Experience:
One of our customers had to test execute number of combinations of RF line testing post cabling in large outdoor stadium and multi-story building etc. For example, with each combination having 20 test cases, for a large outdoor stadium, the tests would mean execution of 5000 test cases which would take 3 to 5 weeks at any given time.
Nesh leveraged Cucumber test framework which define application behaviour in plain meaningful English text using a simple grammar defined by a language called Gherkin.
It allows automation of functional validation in easily readable and understandable format (like plain English) to Business Analysts, Developers, Testers, etc. using a simple grammar defined by a language called Gherkin. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented.
Test Flow:
Our approach to using Cucumber for test automation involved the following 3 steps.
Step 1: Define the Feature and create the Feature Files
Feature files are the essential part of cucumber which is used to write test automation steps. A feature file can contain a scenario or can contain many scenarios in a single feature file. All the feature files end with .feature extension.
Step 2: Create the Scenario using Gherkin
Scenario describes the steps for a particular test case. Each feature can have one or more scenarios and every scenario consists of sequence of steps.
Structural syntax of Gherkin:
@TEST
Feature: Login and Signup Functionality Feature
@LOGIN
Scenario: LOGIN TO PORTAL
When open ‘chrome’
And navigate into ‘ https://testportal@neshinc.com’
And type ‘Admin’ into ‘username’
And click ‘continue’
And type ‘admin’ into ‘password’
And click ‘login’
@SIGNUP
Scenario: SIGNUP
When open ‘chrome’
And navigate into ‘ https://testportal@neshinc.com’
And type ‘Admin’ into ‘username’
And click ‘continue’
And type ‘Anita’ into ‘firstname’
And type ‘Ray’ into ‘lastname’
And type ‘admin’ into
‘newpassword’
And Check ‘termscheck’
And click ‘signupsubmit’
Step 3: Tags
Cucumber provides a way to organize your scenario execution by using tags in feature file. Each scenario can be defined with a useful tag. The runner file, decides which specific tag we want Cucumber to execute.
Benefits:
The test automation approach greatly benefited time to release the product to market by improving in the following areas:
• Improved bug detection
• Increased coverage
• Increased reusability
• Better reporting capabilities
Cucumber with java as language integrated with maven for continuous integration has been implemented in our project, we successfully performed smoke test, regression test, functional test and system test. The value addition has been QA productivity increase by 20 – 40%. Quality increase by more than 40%, and time for release is faster by 20 – 40%.
Kindly contact us for more information @ https://www.neshinc.com/contact/