Package gw.test
Class TestExecutionManager
java.lang.Object
gw.test.TestExecutionManager
The TestExecutionManager class is responsible for the actual execution of tests, including executing the before/after
hooks.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Throwableprivate booleanprivate TestEnvironmentprivate booleanprivate longprivate longprivate longprivate longprivate final Map<String,TestExecutionManager.TestInfo> private List<junit.framework.TestSuite>private booleanprivate static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate voidcallAfterTestMethod(TestClass testClass, Throwable e) private voidcallBeforeTestMethod(TestClass testClass) final longfinal booleanfinal booleanprivate booleanisLastTestInSuite(TestClass test) (package private) final voidprivate voidmaybeCallAfterTestClass(TestClass testClass) private voidprivate voidmaybeCallBeforeTestClass(TestClass testClass) private voidvoidprotected TestClassmaybeUnwrapTestClass(TestClass testClass) private voidprintTestRunTime(String msg, long nanoTime) private org.junit.runner.ResultrunImpl(junit.framework.Test test) protected voidrunTestClass(TestClass testClass, junit.framework.TestResult result) protected voidrunTestClassBare(TestClass testClass) final booleanA convenience method for running this suite from a main method.voidsetAssertionsMustBeEnabled(boolean assertionsMustBeEnabled) voidsetEnvironment(TestEnvironment environment) voidsetSuiteTimeoutInMillis(long suiteTimeoutInMillis) voidsetTestsFromSuite(List<junit.framework.TestSuite> testWrappers)
-
Field Details
-
_environment
-
_beforeTestSuiteRun
private boolean _beforeTestSuiteRun -
_typeSystemInitialized
private boolean _typeSystemInitialized -
_beforeTestSuiteFailed
-
_beforeTestClassFailed
-
_testInfos
-
_testWrappers
-
_suiteStartTime
private long _suiteStartTime -
_suiteTimeoutInMillis
private long _suiteTimeoutInMillis -
_suiteHasTimedOut
private boolean _suiteHasTimedOut -
_assertionsMustBeEnabled
private boolean _assertionsMustBeEnabled -
_testClassStartTime
private long _testClassStartTime -
_suiteStartTimeNs
private long _suiteStartTimeNs -
INCLUDE_TEST_TIMING_INFO
private static boolean INCLUDE_TEST_TIMING_INFO
-
-
Constructor Details
-
TestExecutionManager
public TestExecutionManager()
-
-
Method Details
-
setEnvironment
-
setTestsFromSuite
-
setSuiteTimeoutInMillis
public void setSuiteTimeoutInMillis(long suiteTimeoutInMillis) -
assertionsMustBeEnabled
public boolean assertionsMustBeEnabled() -
setAssertionsMustBeEnabled
public void setAssertionsMustBeEnabled(boolean assertionsMustBeEnabled) -
getEnvironment
-
runTestClass
-
maybeUnwrapTestClass
-
runTestClassBare
- Throws:
Throwable
-
maybeInitTypeSystem
public void maybeInitTypeSystem() -
callAfterTestMethod
-
callBeforeTestMethod
-
maybeCallBeforeTestSuite
private void maybeCallBeforeTestSuite() -
runViaStaticSuiteMethod
public final boolean runViaStaticSuiteMethod()A convenience method for running this suite from a main method. Subclasses of Suite can create a main method like so:public static void main(String[] args) { System.exit( new GosuSuite().runSuite() ? 0 : 1 ); }- Returns:
- a boolean saying if all tests passed
-
runImpl
private org.junit.runner.Result runImpl(junit.framework.Test test) -
maybeCallBeforeTestClass
-
maybeCallAfterTestClass
-
maybeCallAfterTestSuite
-
printTestRunTime
-
isLastTestInSuite
-
hasTimeOut
public final boolean hasTimeOut() -
getTimeoutForCurrentTest
public final long getTimeoutForCurrentTest() -
markTimedOut
final void markTimedOut() -
hasTimedOut
public final boolean hasTimedOut()
-