Class CitrusSpringJUnit4Runner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

    public class CitrusSpringJUnit4Runner
    extends org.springframework.test.context.junit4.SpringJUnit4ClassRunner
    JUnit runner reads Citrus test annotation for XML test cases and prepares test execution within proper Citrus test context boundaries. Supports package scan as well as multiple test method annotations within one single class.
    Since:
    2.2
    Author:
    Christoph Deppisch
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected List<org.junit.runners.model.FrameworkMethod> getChildren()  
      protected org.junit.runners.model.Statement methodInvoker​(org.junit.runners.model.FrameworkMethod frameworkMethod, Object testInstance)  
      protected void validateTestMethods​(List<Throwable> errors)  
      • Methods inherited from class org.springframework.test.context.junit4.SpringJUnit4ClassRunner

        createTest, createTestContextManager, getDescription, getExpectedException, getJUnitTimeout, getSpringTimeout, getTestContextManager, isTestMethodIgnored, methodBlock, possiblyExpectingExceptions, run, runChild, withAfterClasses, withAfters, withAfterTestExecutionCallbacks, withBeforeClasses, withBefores, withBeforeTestExecutionCallbacks, withPotentialRepeat, withPotentialTimeout
      • Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

        collectInitializationErrors, computeTestMethods, createTest, describeChild, getTestRules, isIgnored, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor
      • Methods inherited from class org.junit.runners.ParentRunner

        childrenInvoker, classBlock, classRules, createTestClass, filter, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withInterruptIsolation
      • Methods inherited from class org.junit.runner.Runner

        testCount
    • Constructor Detail

      • CitrusSpringJUnit4Runner

        public CitrusSpringJUnit4Runner​(Class<?> clazz)
                                 throws org.junit.runners.model.InitializationError
        Default constructor using class to run.
        Parameters:
        clazz - the test class to be run
        Throws:
        org.junit.runners.model.InitializationError
    • Method Detail

      • methodInvoker

        protected org.junit.runners.model.Statement methodInvoker​(org.junit.runners.model.FrameworkMethod frameworkMethod,
                                                                  Object testInstance)
        Overrides:
        methodInvoker in class org.junit.runners.BlockJUnit4ClassRunner
      • getChildren

        protected List<org.junit.runners.model.FrameworkMethod> getChildren()
        Overrides:
        getChildren in class org.junit.runners.BlockJUnit4ClassRunner
      • validateTestMethods

        protected void validateTestMethods​(List<Throwable> errors)
        Overrides:
        validateTestMethods in class org.junit.runners.BlockJUnit4ClassRunner