Package io.cucumber.testng
Class TestNGCucumberRunner
- java.lang.Object
-
- io.cucumber.testng.TestNGCucumberRunner
-
@API(status=STABLE) public final class TestNGCucumberRunner extends Object
Glue code for running Cucumber via TestNG.Options can be provided in by (order of precedence):
- Properties from
System.getProperties()
- Properties from in
System.getenv()
- Properties properties from
testng.xml
- Annotating the runner class with
CucumberOptions
- Properties from "cucumber.properties"
Constants
. - Properties from
-
-
Constructor Summary
Constructors Constructor Description TestNGCucumberRunner(Class<?> clazz)
Bootstrap the cucumber runtimeTestNGCucumberRunner(Class<?> clazz, CucumberPropertiesProvider properties)
Bootstrap the cucumber runtime
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish()
Finishes test execution by Cucumber.Object[][]
provideScenarios()
void
runScenario(Pickle pickle)
-
-
-
Constructor Detail
-
TestNGCucumberRunner
public TestNGCucumberRunner(Class<?> clazz)
Bootstrap the cucumber runtime- Parameters:
clazz
- Which has theCucumberOptions
andTest
annotations
-
TestNGCucumberRunner
@API(status=STABLE, since="6.11") public TestNGCucumberRunner(Class<?> clazz, CucumberPropertiesProvider properties)
Bootstrap the cucumber runtime- Parameters:
clazz
- Which has theCucumberOptions
andTest
annotationsproperties
- additional properties (e.g. fromtestng.xml
).
-
-
Method Detail
-
runScenario
public void runScenario(Pickle pickle)
-
finish
public void finish()
Finishes test execution by Cucumber.
-
provideScenarios
public Object[][] provideScenarios()
- Returns:
- returns the cucumber scenarios as a two dimensional array of
PickleWrapper
scenarios combined with theirFeatureWrapper
feature.
-
-