0 Shares 1442 Views

Cucumber Workflow

Sep 21, 2016
1442 Views
how-cucumber-works

How Cucumber works?
How does Cucumber interacts with different components of a framework?

Lately, my inbox flooded with this question asked by many of you. With this heavy interest on the topic, I thought to put together this post, so that this question can be answered broadly and others can also get benefited. I have tried to detail as mush as possible, please let us know your views and questions if any thorough comments for this post.

I recommend to go through our earlier posts on Cucumber before proceeding on this post. You will have a better idea and can relate appropriately.

 

Lets assume, we have written  features and scenarios in Gherkin and code has already been written in Step Definition file. Now as soon as execution is kicked off, Cucumber reads specification from feature file ,checks for the scenario that needs to be tested and execute the scenario against the system.

When we say that Cucumber execute the scenario written in feature file ,in actual it is interaction of  feature file with step definition file i.e. mapping of the business-readable language of each step written in feature file with program code written in step definition language.

The subsequent flowchart depicts the test execution using Cucumber.

The diagram starts with the execution of scenario as first step followed by Cucumber reading the first step of scenario written in feature file and will try to find the match for the same in the step definition file.

If its not able to find the match it will stop the execution their itself and will throw an error “Undefined scenario error”.In case it find the corresponding matching , it will execute that execute corresponding step definitions code block.

If the definition block throw an exception, cucumber will determine whether the step has failed or code has not been written for the specific step.In both the case the execution of the scenario will be terminated at the failure step and execution will proceed to next scenario.

In case of Pass ,Cucumber will start with the execution of the next step and this will be continuing either till the end of the scenario in case all the steps are getting passed one by one or till the termination of the scenario due to failure of any steps.

cucumber-workflow

 

This was quick, but I hope it must have helped you to get an idea of the Cucumber architecture.

In next post we will discuss on the automation tools that supports cucumber based automation and also the configuration of Cucumber on few of these tools.

Till then –Happy learning!!

You may be interested

Setting up Web Service Automation Project
Katalon Studio
481 views
Katalon Studio
481 views

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

Setting up Mobile Automation Project in MacOS
Katalon Studio
537 views1
Katalon Studio
537 views1

Setting up Mobile Automation Project in MacOS

Saket - Oct 09, 2017

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators. This tutorial explains how…

UFT Jenkins Integration
Unified Functional Testing
1642 views
Unified Functional Testing
1642 views

UFT Jenkins Integration

Saket - Oct 03, 2017

In our earlier post, we got to know the easy integration of UFT with GIT. This post focuses on integration of UFT and Jenkins. I have also…

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...