Class SpringIntegrationSerenityRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
net.serenitybdd.junit.runners.SerenityRunner
net.serenitybdd.junit.spring.integration.SpringIntegrationSerenityRunner
- All Implemented Interfaces:
net.thucydides.core.tags.Taggable,org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
public class SpringIntegrationSerenityRunner extends SerenityRunner
A serenity runner that automatically adds rules
SpringIntegrationMethodRule and SpringIntegrationClassRule.- Author:
- [email protected]
-
Constructor Summary
Constructors Constructor Description SpringIntegrationSerenityRunner(java.lang.Class<?> testClass)Create a Serenity runner for a particular class. -
Method Summary
Modifier and Type Method Description protected java.util.List<org.junit.rules.TestRule>classRules()Sets up an instance ofSpringIntegrationClassRulein the list of class rules, creating one if missing.java.lang.ObjectcreateTest()Prepares the test instance after creating the test instance.protected java.util.List<org.junit.rules.MethodRule>rules(java.lang.Object target)Sets up an instance ofSpringIntegrationMethodRulein the list of method rules, creating one if missing.Methods inherited from class net.serenitybdd.junit.runners.SerenityRunner
additionalBrowserCleanup, driverFor, generateReports, getBatchManager, getConfiguration, getDefaultReporters, getDriver, getDriver, getOutputDirectory, getPages, getStepListener, getTestOutcomes, initListeners, initListenersUsing, initStepEventBus, injectAnnotatedPagesObjectInto, injectDriverInto, injectEnvironmentVariablesInto, injectScenarioStepsInto, methodInvoker, prepareBrowserForTest, run, runChild, setStepListener, subscribeReporter, useQualifierMethods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, possiblyExpectingExceptions, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, 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
-
SpringIntegrationSerenityRunner
public SpringIntegrationSerenityRunner(java.lang.Class<?> testClass) throws org.junit.runners.model.InitializationErrorCreate a Serenity runner for a particular class.- Parameters:
testClass- The class to test.- Throws:
org.junit.runners.model.InitializationError- If the super constructor throws anInitializationError.
-
-
Method Details
-
createTest
public java.lang.Object createTest() throws java.lang.ExceptionPrepares the test instance after creating the test instance.- Overrides:
createTestin classorg.junit.runners.BlockJUnit4ClassRunner- Returns:
- The new test instance.
- Throws:
java.lang.Exception- Passed up from the superclass.
-
rules
protected java.util.List<org.junit.rules.MethodRule> rules(java.lang.Object target)Sets up an instance ofSpringIntegrationMethodRulein the list of method rules, creating one if missing. Also removes anySpringIntegrationrule.- Overrides:
rulesin classorg.junit.runners.BlockJUnit4ClassRunner- Parameters:
target- The target instance. Not used here, but passed down to super method.- Returns:
- The list of method rules.
-
classRules
protected java.util.List<org.junit.rules.TestRule> classRules()Sets up an instance ofSpringIntegrationClassRulein the list of class rules, creating one if missing.- Overrides:
classRulesin classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>- Returns:
- The list of class rules.
-