public class Cucumber extends ParentRunner<cucumber.runtime.junit.FeatureRunner>
Classes annotated with @RunWith(Cucumber.class) will run a Cucumber Feature.
The class should be empty without any fields or methods.
Cucumber will look for a .feature file on the classpath, using the same resource
path as the annotated class (.class substituted by .feature).
CucumberOptions.CucumberOptions| Constructor and Description |
|---|
Cucumber(Class clazz)
Constructor called by JUnit.
|
| Modifier and Type | Method and Description |
|---|---|
protected cucumber.runtime.Runtime |
createRuntime(cucumber.runtime.io.ResourceLoader resourceLoader,
ClassLoader classLoader,
cucumber.runtime.RuntimeOptions runtimeOptions)
Create the Runtime.
|
protected Description |
describeChild(cucumber.runtime.junit.FeatureRunner child) |
List<cucumber.runtime.junit.FeatureRunner> |
getChildren() |
void |
run(RunNotifier notifier) |
protected void |
runChild(cucumber.runtime.junit.FeatureRunner child,
RunNotifier notifier) |
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClassespublic Cucumber(Class clazz) throws org.junit.runners.model.InitializationError, IOException
clazz - the class with the @RunWith annotation.IOException - if there is a problemorg.junit.runners.model.InitializationError - if there is another problemprotected cucumber.runtime.Runtime createRuntime(cucumber.runtime.io.ResourceLoader resourceLoader,
ClassLoader classLoader,
cucumber.runtime.RuntimeOptions runtimeOptions)
throws org.junit.runners.model.InitializationError,
IOException
resourceLoader - used to load resourcesclassLoader - used to load classesruntimeOptions - configurationorg.junit.runners.model.InitializationError - if a JUnit error occurredIOException - if a class or resource could not be loadedpublic List<cucumber.runtime.junit.FeatureRunner> getChildren()
getChildren in class ParentRunner<cucumber.runtime.junit.FeatureRunner>protected Description describeChild(cucumber.runtime.junit.FeatureRunner child)
describeChild in class ParentRunner<cucumber.runtime.junit.FeatureRunner>protected void runChild(cucumber.runtime.junit.FeatureRunner child,
RunNotifier notifier)
runChild in class ParentRunner<cucumber.runtime.junit.FeatureRunner>public void run(RunNotifier notifier)
run in class ParentRunner<cucumber.runtime.junit.FeatureRunner>Copyright © 2016. All Rights Reserved.