Usage of Cucumber Options which we use in TestRunner File


Usage of Cucumber Options which we use in TestRunner File

TestRunner File is used to build a Communication between Feature Files and StepDefinition Files. 


features: We use Cucumber features option to define path of feature file(s). 

glue: We use Cucumber glue option to define path of step definition file(s). 

format: We use Cucumber format option to generate output or test results in different types of formats. 
Eg: HTML Report, JUnit or TestNG Report, Cucumber Report and So. 

monochrome: We use Cucumber monochrome option to print console output in a very readable format. 
monochrome must be set to true in order to achieve it. 

strict: We use Cucumber strict option to check if any step if not defined in step definition file. 
If any step is not defined in step definition file then it will stop an execution of program. 

dryRun: We use Cucumber dryRun option to check whether all the steps from feature files has got methods and implemented or no in Step Definition File. 
Before execution of program dryRun must be set to true and we need to make sure that all steps are implemented in Step Definition File. 
Once we are sure that all steps are implemented then dryRun must be set to False and we should continue with Test Execution.

tags: We use Cucumber tags option when we have more number of scenarios in a single feature file which represents different purpose [Smoke, Sanity, Regression etc] in such cases we can make use tags option.
Eg: tags={ " @ Smoke " } >> It will pick only and only those scenarios which are tagged with Smoke in feature files.

   This blog is contributed by Pavan KrishnanReddy Working as Testing Executive at Infosys Limited            










Cheers!
Naveen AutomationLabs

1 comment:

  1. Wonderful work! This is the type of information that should be shared around the internet. Shame on Google for not positioning this post higher! Come on over and visit my web site . Thanks =) Building an E-Commerce Brand

    ReplyDelete

Featured Post

Advanced Selenium Webdriver Interview Questions and Answers in Java

Advanced Selenium Webdriver Interview Questions and Answers in Java Selenium WebDriver - QA Here is the list of Selenium Inte...