-1

I have several Cucumber features with steps, which are implemented by Groovy/Java code, but after several changes on the implementation side, like: I refactor step's regex, I can't be sure that all steps in feature files can be run now without running them.

I've tried to find some plugin for Gradle to check that all steps in the project are implemented in the code, but I didn't find it.

Does anyone know of a plugin or solution to check this, or do I need to write my own implementation for this?

karel
  • 5,489
  • 46
  • 45
  • 50
skilgal
  • 172
  • 1
  • 4
  • 14

1 Answers1

0

Afaik you can use the dry flag to do this. "For example if you want to check whether all feature file steps have corresponding step definitions, you can specify it like this:

package com.example;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(dryRun=true)
class RunCucumberTest {
}

See the docs

Marit
  • 2,399
  • 18
  • 27