Class HybrisTestRunner


  • public class HybrisTestRunner
    extends org.junit.runner.notification.RunListener
    Not thread safe test runner. Meant to be used as prototype per request thread.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener

        org.junit.runner.notification.RunListener.ThreadSafe
    • Constructor Detail

      • HybrisTestRunner

        public HybrisTestRunner()
      • HybrisTestRunner

        public HybrisTestRunner​(org.junit.runner.JUnitCore junitCore)
    • Method Detail

      • runTest

        public HybrisTestsResult runTest​(java.lang.Class... testClassNames)
                                  throws java.lang.IllegalArgumentException
        Parameters:
        testClassNames - vararg of test classes to be run
        Returns:
        result for runner see HybrisTestsResult
        Throws:
        java.lang.IllegalArgumentException - when null class given
      • runTest

        public HybrisTestsResult runTest​(java.lang.Class testClassName,
                                         java.lang.String testName)
                                  throws java.lang.IllegalArgumentException
        Parameters:
        testClassName - test class to be run
        testName - test case to run
        Returns:
        result for runner see HybrisTestsResult
        Throws:
        java.lang.IllegalArgumentException - when null class given or blank test name. Be aware that incorrect(not existing) testName will be reported as test case failure.
      • runTests

        public HybrisTestsResult runTests​(java.lang.Class testClassName,
                                          java.lang.String... testNames)
      • testAssumptionFailure

        public void testAssumptionFailure​(org.junit.runner.notification.Failure failure)
        Overrides:
        testAssumptionFailure in class org.junit.runner.notification.RunListener
      • testFailure

        public void testFailure​(org.junit.runner.notification.Failure failure)
                         throws java.lang.Exception
        Overrides:
        testFailure in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • testFinished

        public void testFinished​(org.junit.runner.Description description)
                          throws java.lang.Exception
        Overrides:
        testFinished in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • testIgnored

        public void testIgnored​(org.junit.runner.Description description)
                         throws java.lang.Exception
        Overrides:
        testIgnored in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • testRunFinished

        public void testRunFinished​(org.junit.runner.Result result)
                             throws java.lang.Exception
        Overrides:
        testRunFinished in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • testRunStarted

        public void testRunStarted​(org.junit.runner.Description description)
                            throws java.lang.Exception
        Overrides:
        testRunStarted in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • testStarted

        public void testStarted​(org.junit.runner.Description description)
                         throws java.lang.Exception
        Overrides:
        testStarted in class org.junit.runner.notification.RunListener
        Throws:
        java.lang.Exception
      • afterCreation

        @PostConstruct
        public void afterCreation()
      • beforeDestroy

        @PreDestroy
        public void beforeDestroy()