Skip to main content

Cucumber 6 default to --strict mode

Earlier Cucumber other implementation except Cucumber-JVM default to --non-strict mode. With version 6, Cucumber-JVM will default to --strict mode.

Cucumber Options Strict Deprecated

In @CucumberOptions if you will use strict option it will give you Deprecated warning that strict option will be removed soon. Therefore if you will set strict =

  • false: During execution you will get error @CucumberOptions(strict=false) is no longer supported. Please use strict=true 
  • true: Your program will execute but that is of no use. Even if you remove strict = true. There is no impact. 
@CucumberOptions(
		plugin = {"pretty","json:target/cucumber/cucumber.json"}, 
		features = {"src/test/resources/features"},
		glue={"com.pb.cucumbertest.stepdefinitions"},
		monochrome = true,
		strict = true,
		dryRun = false,
		tags = ("@SmokeTest"))

Submitted by tgoswami on August 30, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.