Package de.hybris.platform.testframework
Class HybrisTestRunner
- java.lang.Object
-
- org.junit.runner.notification.RunListener
-
- de.hybris.platform.testframework.HybrisTestRunner
-
public class HybrisTestRunner extends org.junit.runner.notification.RunListenerNot thread safe test runner. Meant to be used as prototype per request thread.
-
-
Constructor Summary
Constructors Constructor Description HybrisTestRunner()HybrisTestRunner(org.junit.runner.JUnitCore junitCore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterCreation()voidbeforeDestroy()HybrisTestsResultrunTest(java.lang.Class... testClassNames)HybrisTestsResultrunTest(java.lang.Class testClassName, java.lang.String testName)HybrisTestsResultrunTests(java.lang.Class testClassName, java.lang.String... testNames)voidtestAssumptionFailure(org.junit.runner.notification.Failure failure)voidtestFailure(org.junit.runner.notification.Failure failure)voidtestFinished(org.junit.runner.Description description)voidtestIgnored(org.junit.runner.Description description)voidtestRunFinished(org.junit.runner.Result result)voidtestRunStarted(org.junit.runner.Description description)voidtestStarted(org.junit.runner.Description description)
-
-
-
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 runtestName- 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:
testAssumptionFailurein classorg.junit.runner.notification.RunListener
-
testFailure
public void testFailure(org.junit.runner.notification.Failure failure) throws java.lang.Exception- Overrides:
testFailurein classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
testFinished
public void testFinished(org.junit.runner.Description description) throws java.lang.Exception- Overrides:
testFinishedin classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
testIgnored
public void testIgnored(org.junit.runner.Description description) throws java.lang.Exception- Overrides:
testIgnoredin classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
testRunFinished
public void testRunFinished(org.junit.runner.Result result) throws java.lang.Exception- Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
testRunStarted
public void testRunStarted(org.junit.runner.Description description) throws java.lang.Exception- Overrides:
testRunStartedin classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
testStarted
public void testStarted(org.junit.runner.Description description) throws java.lang.Exception- Overrides:
testStartedin classorg.junit.runner.notification.RunListener- Throws:
java.lang.Exception
-
afterCreation
@PostConstruct public void afterCreation()
-
beforeDestroy
@PreDestroy public void beforeDestroy()
-
-