Class HybrisTestRunner

java.lang.Object
org.junit.runner.notification.RunListener
de.hybris.platform.testframework.HybrisTestRunner

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

    • HybrisTestRunner

      public HybrisTestRunner()
    • HybrisTestRunner

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

    • runTest

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

      public HybrisTestsResult runTest(Class testClassName, String testName) throws IllegalArgumentException
      Parameters:
      testClassName - test class to be run
      testName - test case to run
      Returns:
      result for runner see HybrisTestsResult
      Throws:
      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(Class testClassName, 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 Exception
      Overrides:
      testFailure in class org.junit.runner.notification.RunListener
      Throws:
      Exception
    • testFinished

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

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

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

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

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

      @PostConstruct public void afterCreation()
    • beforeDestroy

      @PreDestroy public void beforeDestroy()