0% found this document useful (0 votes)
62 views1 page

Dry Run

Cucumber dry run verifies the compilation of Step Definition and Feature files by checking for errors, allowing steps in the Feature file to be tested against their implementation in the Step Definition file and throwing messages for any unimplemented steps. The dry run parameter is configured via the @CucumberOptions annotation in the Test Runner Class file to set its value to true or false, with false being the default.

Uploaded by

Piyush Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views1 page

Dry Run

Cucumber dry run verifies the compilation of Step Definition and Feature files by checking for errors, allowing steps in the Feature file to be tested against their implementation in the Step Definition file and throwing messages for any unimplemented steps. The dry run parameter is configured via the @CucumberOptions annotation in the Test Runner Class file to set its value to true or false, with false being the default.

Uploaded by

Piyush Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Cucumber dry run is used for compilation of the Step Definition and Feature files and to

verify the compilation errors. The value of dry run can be either true or false. The default
value of dry run is false and it is a part of the Test Runner Class file.
In case the value of dry run is set to true, Cucumber will verify individual steps in the
Feature file and the implementation code of steps in Feature file within the Step Definition
file.
A message is thrown, if any of the steps in the Feature file is not implemented in the Step
Definition file. A dry run parameter is a part of the @CucumberOptions which is used to
configure the test settings.

Example
Implementation of Test Runner Class file
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "Feature"
,glue={"stepDefinition"}
,strict = true
,dryRun = true
)
public class TestRunner {
}

You might also like