Package gw.test
Class TestExecutionManager
- java.lang.Object
-
- gw.test.TestExecutionManager
-
public class TestExecutionManager extends Object
The TestExecutionManager class is responsible for the actual execution of tests, including executing the before/after hooks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestExecutionManager.TestInfo
-
Constructor Summary
Constructors Constructor Description TestExecutionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
assertionsMustBeEnabled()
TestEnvironment
getEnvironment()
long
getTimeoutForCurrentTest()
boolean
hasTimedOut()
boolean
hasTimeOut()
void
maybeInitTypeSystem()
protected TestClass
maybeUnwrapTestClass(TestClass testClass)
protected void
runTestClass(TestClass testClass, junit.framework.TestResult result)
protected void
runTestClassBare(TestClass testClass)
boolean
runViaStaticSuiteMethod()
A convenience method for running this suite from a main method.void
setAssertionsMustBeEnabled(boolean assertionsMustBeEnabled)
void
setEnvironment(TestEnvironment environment)
void
setSuiteTimeoutInMillis(long suiteTimeoutInMillis)
void
setTestsFromSuite(List<junit.framework.TestSuite> testWrappers)
-
-
-
Method Detail
-
setEnvironment
public void setEnvironment(TestEnvironment environment)
-
setTestsFromSuite
public void setTestsFromSuite(List<junit.framework.TestSuite> testWrappers)
-
setSuiteTimeoutInMillis
public void setSuiteTimeoutInMillis(long suiteTimeoutInMillis)
-
assertionsMustBeEnabled
public boolean assertionsMustBeEnabled()
-
setAssertionsMustBeEnabled
public void setAssertionsMustBeEnabled(boolean assertionsMustBeEnabled)
-
getEnvironment
public TestEnvironment getEnvironment()
-
runTestClass
protected void runTestClass(TestClass testClass, junit.framework.TestResult result)
-
runTestClassBare
protected void runTestClassBare(TestClass testClass) throws Throwable
- Throws:
Throwable
-
maybeInitTypeSystem
public void maybeInitTypeSystem()
-
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
-
hasTimeOut
public final boolean hasTimeOut()
-
getTimeoutForCurrentTest
public final long getTimeoutForCurrentTest()
-
hasTimedOut
public final boolean hasTimedOut()
-
-