What is the purpose of cucumber dryRun?

Dry run gives you a way to quickly scan your features without actually running them. It make sure that every Step have the corresponding method available in the Step Definition file. dryRun option can either set as true or false. 

Cucumber dry run is used to compile cucumber feature files and stepDefinitions. If there is any compilations errors it will show when we use dry run.,

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. 

False: When it is set to false, all statements/code inside the step definitions method will execute.

How to use dryRun inside Java @CucumberOptions annotation

		plugin = {"pretty", "html:target/cucumber"},
		features = {"features"},
		dryRun = true