Package io.cucumber.testng
Class TestNGCucumberRunner
java.lang.Object
io.cucumber.testng.TestNGCucumberRunner
@Deprecated(forRemoval=true)
@API(status=DEPRECATED)
public final class TestNGCucumberRunner
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CucumberExecutionContextDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionTestNGCucumberRunner(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Bootstrap the cucumber runtimeTestNGCucumberRunner(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version.Bootstrap the cucumber runtime -
Method Summary
Modifier and TypeMethodDescriptionprivate CucumberExecutionContextcreateExecutionContext(Class<?> clazz, Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions, EventBus bus, ExitStatus exitStatus) Deprecated, for removal: This API element is subject to removal in a future version.private static FeaturePathFeatureSuppliercreateFeatureSupplier(UuidGenerator idGenerator, Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions) Deprecated, for removal: This API element is subject to removal in a future version.private static UuidGeneratorcreateIdGenerator(Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions) Deprecated, for removal: This API element is subject to removal in a future version.private static RuntimeOptionscreateRuntimeOptions(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version.voidfinish()Deprecated, for removal: This API element is subject to removal in a future version.Finishes test execution by Cucumber.static Object[][]provideDryRunScenarios(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios for executing without initializing Cucumber.static Object[][]provideDryRunScenarios(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios without initializing Cucumber.Object[][]Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios for execution.private static Object[][]provideScenarios(List<Feature> features, Predicate<Pickle> filters, boolean dryrun) Deprecated, for removal: This API element is subject to removal in a future version.voidrunScenario(Pickle pickle) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
filters
Deprecated, for removal: This API element is subject to removal in a future version. -
features
Deprecated, for removal: This API element is subject to removal in a future version. -
context
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
TestNGCucumberRunner
Deprecated, for removal: This API element is subject to removal in a future version.Bootstrap the cucumber runtime- Parameters:
clazz- Which has theCucumberOptionsandTestannotations
-
TestNGCucumberRunner
@API(status=STABLE, since="6.11") public TestNGCucumberRunner(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version.Bootstrap the cucumber runtime- Parameters:
clazz- Which has theCucumberOptionsandTestannotationsproperties- additional properties (e.g. fromtestng.xml).
-
-
Method Details
-
createRuntimeOptions
private static RuntimeOptions createRuntimeOptions(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version. -
createFeatureSupplier
private static FeaturePathFeatureSupplier createFeatureSupplier(UuidGenerator idGenerator, Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions) Deprecated, for removal: This API element is subject to removal in a future version. -
createIdGenerator
private static UuidGenerator createIdGenerator(Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions) Deprecated, for removal: This API element is subject to removal in a future version. -
createExecutionContext
private CucumberExecutionContext createExecutionContext(Class<?> clazz, Supplier<ClassLoader> classLoader, RuntimeOptions runtimeOptions, EventBus bus, ExitStatus exitStatus) Deprecated, for removal: This API element is subject to removal in a future version. -
runScenario
Deprecated, for removal: This API element is subject to removal in a future version. -
finish
public void finish()Deprecated, for removal: This API element is subject to removal in a future version.Finishes test execution by Cucumber. -
provideScenarios
Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios for execution.- Returns:
- an array of pickle and feature wrapper pairs.
-
provideDryRunScenarios
@API(status=EXPERIMENTAL, since="8.0.0") public static Object[][] provideDryRunScenarios(Class<?> clazz) Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios for executing without initializing Cucumber. These scenarios can only be used when TestNG does a dry-run.For consistent results between dry-run and regular execution, this method should be used when the TestNGCucumberRunner is instantiated by
TestNGCucumberRunner(java.lang.Class<?>).- Parameters:
clazz- Which has theCucumberOptionsandTestannotations- Returns:
- an array of pickle and feature wrapper pairs.
-
provideDryRunScenarios
@API(status=EXPERIMENTAL, since="8.0.0") public static Object[][] provideDryRunScenarios(Class<?> clazz, CucumberPropertiesProvider properties) Deprecated, for removal: This API element is subject to removal in a future version.Provides scenarios without initializing Cucumber. These scenarios can only be used when TestNG does a dry-run. p> For consistent results between dry-run and regular execution, this method should be used when the TestNGCucumberRunner is instantiated byTestNGCucumberRunner(java.lang.Class<?>,io.cucumber.testng.CucumberPropertiesProvider).- Parameters:
clazz- Which has theCucumberOptionsandTestannotations- Returns:
- an array of pickle and feature wrapper pairs.
-
provideScenarios
private static Object[][] provideScenarios(List<Feature> features, Predicate<Pickle> filters, boolean dryrun) Deprecated, for removal: This API element is subject to removal in a future version.
-
Please switch to cucumber-junit-platform-engine. If there are missing features that prevent you from upgrading please create an issue.