There are several options which you can use as a part of this @CucumberOptions annotation. Below is the list:
Modifier and Type | Optional Element and Description |
---|---|
boolean | dryRun |
String[] | features |
String[] | format deprecated. use plugin() |
String[] | glue |
String[] | junit |
boolean | monochrome |
String[] | name |
String[] | plugin |
SnippetType | snippets |
boolean | strict |
String[] | tag |
Check below example, using several cucumber options:
import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"pretty", "html:target/cucumber"},
features = {"features"},
glue={"com.pb.cucumbertest.stepdefinitions"},
monochrome = true,
tags = {"@contactus"},
dryRun = false,
strict = true
)
public class Runner {
}