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.model.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 net.serenitybdd.junit.runners.SerenityRunner
A serenity runner that automatically adds rules SpringIntegrationMethodRule and SpringIntegrationClassRule.
Author:
[email protected]
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a Serenity runner for a particular class.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<org.junit.rules.TestRule>
    Sets up an instance of SpringIntegrationClassRule in the list of class rules, creating one if missing.
    Prepares the test instance after creating the test instance.
    protected List<org.junit.rules.MethodRule>
    rules(Object target)
    Sets up an instance of SpringIntegrationMethodRule in 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, useQualifier

    Methods 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, withPotentialTimeout

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, 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

    • SpringIntegrationSerenityRunner

      public SpringIntegrationSerenityRunner(Class<?> testClass) throws org.junit.runners.model.InitializationError
      Create a Serenity runner for a particular class.
      Parameters:
      testClass - The class to test.
      Throws:
      org.junit.runners.model.InitializationError - If the super constructor throws an InitializationError.
  • Method Details

    • createTest

      public Object createTest() throws Exception
      Prepares the test instance after creating the test instance.
      Overrides:
      createTest in class org.junit.runners.BlockJUnit4ClassRunner
      Returns:
      The new test instance.
      Throws:
      Exception - Passed up from the superclass.
    • rules

      protected List<org.junit.rules.MethodRule> rules(Object target)
      Sets up an instance of SpringIntegrationMethodRule in the list of method rules, creating one if missing. Also removes any SpringIntegration rule.
      Overrides:
      rules in class org.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 List<org.junit.rules.TestRule> classRules()
      Sets up an instance of SpringIntegrationClassRule in the list of class rules, creating one if missing.
      Overrides:
      classRules in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
      Returns:
      The list of class rules.