Package dev.galasa.framework
Class TestClassWrapper
java.lang.Object
dev.galasa.framework.TestClassWrapper
Representation of the test class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTestClassWrapper
(String testBundle, Class<?> testClass, TestStructure testStructure, boolean isContinueOnTestFailureFromCPS, IResultArchiveStore ras, dev.galasa.framework.internal.runner.InterruptedMonitor interruptedMonitor) ConstructorTestClassWrapper
(String testBundle, Class<?> testClass, TestStructure testStructure, boolean isContinueOnTestFailureFromCPS, IResultArchiveStore ras, dev.galasa.framework.internal.runner.InterruptedMonitor interruptedMonitor, org.apache.commons.logging.Log logger) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTestMethodResult
(ITestMethodResult testMethodResult, ITestRunManagers managers) protected Result
protected long
void
Instantiate test class and set field valuesprotected boolean
void
Process the test class looking for test methods and fields that need to be injectedprotected void
runAfterClassMethods
(@NotNull ITestRunManagers managers) protected void
runBeforeClassMethods
(@NotNull ITestRunManagers managers) protected void
runGenericMethods
(@NotNull ITestRunManagers managers, ArrayList<GenericMethodWrapper> genericMethods) Run generic methods.void
runMethods
(@NotNull ITestRunManagers managers, IDynamicStatusStoreService dss, String runName) Run the test methods in declared order together with @BeforeClass, @Before, @After and @AfterClassprotected void
runTestMethods
(@NotNull ITestRunManagers managers, IDynamicStatusStoreService dss, String runName) Run the test methods.protected void
setResult
(@Null Result newResult, @Null ITestRunManagers managers) protected void
setResultWithoutTellingManagers
(@Null Result newResult)
-
Field Details
-
testClassObject
-
LOG_STARTING
- See Also:
-
LOG_ENDING
- See Also:
-
LOG_START_LINE
-
LOG_ASTERS
-
-
Constructor Details
-
TestClassWrapper
public TestClassWrapper(String testBundle, Class<?> testClass, TestStructure testStructure, boolean isContinueOnTestFailureFromCPS, IResultArchiveStore ras, dev.galasa.framework.internal.runner.InterruptedMonitor interruptedMonitor) throws ConfigurationPropertyStoreException Constructor -
TestClassWrapper
public TestClassWrapper(String testBundle, Class<?> testClass, TestStructure testStructure, boolean isContinueOnTestFailureFromCPS, IResultArchiveStore ras, dev.galasa.framework.internal.runner.InterruptedMonitor interruptedMonitor, org.apache.commons.logging.Log logger) throws ConfigurationPropertyStoreException
-
-
Method Details
-
parseTestClass
Process the test class looking for test methods and fields that need to be injected- Throws:
TestRunException
-
instantiateTestClass
Instantiate test class and set field values- Throws:
TestRunException
-
runBeforeClassMethods
protected void runBeforeClassMethods(@NotNull @NotNull ITestRunManagers managers) throws TestRunException - Throws:
TestRunException
-
runAfterClassMethods
protected void runAfterClassMethods(@NotNull @NotNull ITestRunManagers managers) throws TestRunException - Throws:
TestRunException
-
runMethods
public void runMethods(@NotNull @NotNull ITestRunManagers managers, IDynamicStatusStoreService dss, String runName) throws TestRunException Run the test methods in declared order together with @BeforeClass, @Before, @After and @AfterClass- Parameters:
managers
-dss
-runName
-- Throws:
TestRunException
-
runGenericMethods
protected void runGenericMethods(@NotNull @NotNull ITestRunManagers managers, ArrayList<GenericMethodWrapper> genericMethods) throws TestRunException Run generic methods. These are methods annotated with @BeforeClass or @AfterClass. The result is set in this test class wrapper at the end of every generic method.- Parameters:
managers
-genericMethods
-- Throws:
TestRunException
-
runTestMethods
protected void runTestMethods(@NotNull @NotNull ITestRunManagers managers, IDynamicStatusStoreService dss, String runName) throws TestRunException Run the test methods. These are methods annotated with @Test. The result is set in this test class wrapper from the test method wrapper after each @Test method.- Parameters:
managers
-dss
-runName
-- Throws:
TestRunException
-
setResult
-
addTestMethodResult
-
setResultWithoutTellingManagers
-
getResult
-
isContinueOnTestFailureSet
protected boolean isContinueOnTestFailureSet() -
getRunLogLineCount
protected long getRunLogLineCount()
-