What is Cucumber dry run?

0 votes
What is Cucumber dry run?
Aug 23, 2019 in Selenium by Zakir
4,984 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,110 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
313 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,930 points
563 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,110 points
245 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,110 points
162 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
920 views
0 votes
2 answers

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

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

answered Sep 4 in Selenium by Sri
• 2,970 points
833 views
0 votes
2 answers

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
3,534 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,539 views
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,890 points
2,596 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
2,865 views