def invalidInputPauseExecution(): ejecutor = TBTAFExecutor() suite = TBTestSuite(1,'Sample test 3') for i in range(3): newTest = TBTAFSampleTest() suite.addTestCase(newTest) ejecutor.pauseExecution(suite)
def validInputPauseResumeExecution(): ejecutor = TBTAFExecutor() suite = TBTestSuite(1,'Sample test 5') for i in range(3): newTest = TBTAFSampleTest() suite.addTestCase(newTest) ejecutor.executeTests(suite) time.sleep(10) ejecutor.pauseExecution(suite) ejecutor.getStatus(suite) time.sleep(10) ejecutor.getStatus(suite) ejecutor.resumeExecution(suite) waitingComplete = True while waitingComplete: result = ejecutor.getStatus(suite) time.sleep(5) waitingComplete = result.getExecutionStatusType() != TBTAFExecutionStatusType.COMPLETED