Running Strict and Running Dry

When a Cucumber project becomes big, it becomes very important that we keep the integrity of the system intact. It should not happen that the addition/modification of Scenarios is breaking the system. So, how to quickly check whether all the Steps have an associated Step Definition defined (without executing the code in those Step Definitions)? Let's understand that in our upcoming section.

How to do it…

  1. Add the dryRun option to @CucumberOptions and set its value to true.
  2. Add the strict option to @CucumberOptions and set its value to false.
  3. Add the monochrome option to @CucumberOptions and set its value to true.

This is how our RunCukeTest.Java class should look like:

package com.CucumberOptions; import org.junit.runner.RunWith; ...

Get Cucumber Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.