What is Cucumber dry run?

0 votes
What is Cucumber dry run?
Aug 23, 2019 in Selenium by Zakir
2,869 views

2 answers to this question.

0 votes

Hey Zakir, Dry Run is an option provided by @CucumberOptions which are like property file or settings for your test. Cucumber dry run is basically used to compile cucumber feature files and step Definitions. If there is any compilation errors it will show when we use dry run. 

dryRun option can either set as true or false. If it is set as true, it means that Cucumber will only checks that every Step mentioned in the Feature File have corresponding code written in Step Definition file or not. So in case any of the function is missed in the Step Definition for any Step in Feature File, it will give us the message. For eg. in the following example we have set 'dryRun=True':

import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(
  features = "Feature"
  ,glue={"stepDefinition"}
  ,dryRun = true
  )

public class TestRunner {

}
answered Aug 26, 2019 by Anvi
• 14,050 points
+1 vote
Dry Run is nothing  but checking the complete implementation of all the mentioned steps present in the Feature file.

Before the execution starts . Dry Run is Checking the implementionation  not about the execution  of scripts.

Simply it can validate  your script file
answered Nov 8, 2019 by Venkata
• 160 points

Related Questions In Selenium

0 votes
1 answer

What is Cucumber?

Cucumber is a testing approach which supports ...READ MORE

answered May 13, 2019 in Selenium by Frankie
• 9,810 points
252 views
0 votes
1 answer

What are the software requirements to run a Cucumber web test?

Hi Govind, to run a Cucumber Web ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 27,920 points
193 views
0 votes
1 answer

What is a feature file in Cucumber test and what are its components?

Hey Jagan, Feature file is a file ...READ MORE

answered Aug 27, 2019 in Selenium by Anvi
• 14,050 points
125 views
0 votes
1 answer

What is the use of Steps in Cucumber tool?

Hi Darshan, Steps are basically the Sequences ...READ MORE

answered Aug 27, 2019 in Selenium by Anvi
• 14,050 points
136 views
0 votes
1 answer

What is the difference between thoughtworks.selenium and openqa.selenium selenium?

thoughtworks.selenium is the original Selenium (aka Selenium 1, ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,710 points
683 views
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,710 points
642 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
2,604 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,870 points
2,053 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,870 points
2,156 views