What is Cucumber dry run

0 votes
What is Cucumber dry run?
Aug 24, 2019 in Selenium by Zakir
20,720 views

2 answers to this question.

+1 vote

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,150 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 14, 2019 in Selenium by Frankie
• 9,830 points
1,172 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
• 28,140 points
5,291 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
2,983 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, 2020 in Selenium by Sri
• 3,190 points
2,890 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,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 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,910 points
7,221 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 3, 2020 in Selenium by Sri
• 3,190 points
7,874 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,150 points
2,769 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,150 points
826 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP