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.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidtestAssumptionFailure(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) Methods inherited from class org.junit.runner.notification.RunListener
testSuiteFinished, testSuiteStarted
-
Constructor Details
-
HybrisTestRunner
public HybrisTestRunner() -
HybrisTestRunner
public HybrisTestRunner(org.junit.runner.JUnitCore junitCore)
-
-
Method Details
-
runTest
- 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 runtestName- 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
-
testAssumptionFailure
public void testAssumptionFailure(org.junit.runner.notification.Failure failure) - Overrides:
testAssumptionFailurein classorg.junit.runner.notification.RunListener
-
testFailure
- Overrides:
testFailurein classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testFinished
- Overrides:
testFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testIgnored
- Overrides:
testIgnoredin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testRunFinished
- Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testRunStarted
- Overrides:
testRunStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testStarted
- Overrides:
testStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
afterCreation
@PostConstruct public void afterCreation() -
beforeDestroy
@PreDestroy public void beforeDestroy()
-