Package io.cucumber.junit
Class CucumberSerenityRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
io.cucumber.junit.CucumberSerenityRunner
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
- Direct Known Subclasses:
CucumberWithSerenity
public class CucumberSerenityRunner
extends org.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
Glue code for running Cucumber via Serenity.
Sets up Serenity reporting and instrumentation.
-
Constructor Summary
Constructors Constructor Description CucumberSerenityRunner(java.lang.Class clazz)Constructor called by JUnit. -
Method Summary
Modifier and Type Method Description protected org.junit.runners.model.StatementchildrenInvoker(org.junit.runner.notification.RunNotifier notifier)static io.cucumber.core.runtime.RuntimecreateSerenityEnabledRuntime(java.util.function.Supplier<java.lang.ClassLoader> classLoaderSupplier, io.cucumber.core.options.RuntimeOptions runtimeOptions, Configuration systemConfiguration)static io.cucumber.core.options.RuntimeOptionscurrentRuntimeOptions()protected org.junit.runner.DescriptiondescribeChild(org.junit.runners.ParentRunner<?> child)java.util.List<org.junit.runners.ParentRunner<?>>getChildren()protected voidrunChild(org.junit.runners.ParentRunner<?> child, org.junit.runner.notification.RunNotifier notifier)static voidsetRuntimeOptions(io.cucumber.core.options.RuntimeOptions runtimeOptions)voidsetScheduler(org.junit.runners.model.RunnerScheduler scheduler)Methods inherited from class org.junit.runners.ParentRunner
classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CucumberSerenityRunner
public CucumberSerenityRunner(java.lang.Class clazz) throws org.junit.runners.model.InitializationErrorConstructor called by JUnit.- Parameters:
clazz- the class with the @RunWith annotation.- Throws:
org.junit.runners.model.InitializationError- if there is another problem
-
-
Method Details
-
setRuntimeOptions
public static void setRuntimeOptions(io.cucumber.core.options.RuntimeOptions runtimeOptions) -
currentRuntimeOptions
public static io.cucumber.core.options.RuntimeOptions currentRuntimeOptions() -
createSerenityEnabledRuntime
public static io.cucumber.core.runtime.Runtime createSerenityEnabledRuntime(java.util.function.Supplier<java.lang.ClassLoader> classLoaderSupplier, io.cucumber.core.options.RuntimeOptions runtimeOptions, Configuration systemConfiguration) -
describeChild
protected org.junit.runner.Description describeChild(org.junit.runners.ParentRunner<?> child)- Specified by:
describeChildin classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
runChild
protected void runChild(org.junit.runners.ParentRunner<?> child, org.junit.runner.notification.RunNotifier notifier)- Specified by:
runChildin classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
childrenInvoker
protected org.junit.runners.model.Statement childrenInvoker(org.junit.runner.notification.RunNotifier notifier)- Overrides:
childrenInvokerin classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
setScheduler
public void setScheduler(org.junit.runners.model.RunnerScheduler scheduler)- Overrides:
setSchedulerin classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
getChildren
public java.util.List<org.junit.runners.ParentRunner<?>> getChildren()- Specified by:
getChildrenin classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-