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.Statement
childrenInvoker(org.junit.runner.notification.RunNotifier notifier)
static io.cucumber.core.runtime.Runtime
createSerenityEnabledRuntime(java.util.function.Supplier<java.lang.ClassLoader> classLoaderSupplier, io.cucumber.core.options.RuntimeOptions runtimeOptions, Configuration systemConfiguration)
static io.cucumber.core.options.RuntimeOptions
currentRuntimeOptions()
protected org.junit.runner.Description
describeChild(org.junit.runners.ParentRunner<?> child)
java.util.List<org.junit.runners.ParentRunner<?>>
getChildren()
protected void
runChild(org.junit.runners.ParentRunner<?> child, org.junit.runner.notification.RunNotifier notifier)
static void
setRuntimeOptions(io.cucumber.core.options.RuntimeOptions runtimeOptions)
void
setScheduler(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, withInterruptIsolation
Methods inherited from class org.junit.runner.Runner
testCount
Methods 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:
describeChild
in 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:
runChild
in classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
childrenInvoker
protected org.junit.runners.model.Statement childrenInvoker(org.junit.runner.notification.RunNotifier notifier)- Overrides:
childrenInvoker
in classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
setScheduler
public void setScheduler(org.junit.runners.model.RunnerScheduler scheduler)- Overrides:
setScheduler
in classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-
getChildren
public java.util.List<org.junit.runners.ParentRunner<?>> getChildren()- Specified by:
getChildren
in classorg.junit.runners.ParentRunner<org.junit.runners.ParentRunner<?>>
-