Forum Discussion
Raveees
Occasional Contributor
Yes, Is there a solution to create a subgroup and move all the failed tests in Execution Plan without lot of manual efforts?
Mr_Bro
3 years agoChampion Level 0
Raveees ,
i would suggest you to use OnStopTestCase event handler to get the object at run time to check if the testcase is passed or not by using the below code snippet, and you can add your logic to re execute your test using aqtestcase.Begin().
code snippet in event handler :
def EventControl1_OnStopTestCase(Sender, StopTestCaseParams):
if StopTestCaseParams.Status == 0: # lsOk
statusId = 1 # Passed
elif StopTestCaseParams.Status == 1: # lsWarning
statusId = 1 # Passed with a warning
comment = StopTestCaseParams.FirstWarningMessage
elif StopTestCaseParams.Status == 2: # lsError
statusId = 5 # Failed
comment = StopTestCaseParams.FirstErrorMessage
if statusId == 1:
Log.Checkpoint("Test Passed without any error")
else:
Log.Warning("Tets Failed")
#Logic to impliment ur re execution
#--------------------
#-------------------