Forum Discussion
Hi Emma,
I am looking an easier way to compare this with the tests in Execution Plan. Do you understand my question?
I am good with the execution logs summary but how do I compare smartly those details with Execution Plan?
Hi Raveees -
So it seems you are looking to make a list of the failed tests and then execute only those tests to run again?
Thanks,
Emma
- Raveees4 years agoOccasional Contributor
Yes, Is there a solution to create a subgroup and move all the failed tests in Execution Plan without lot of manual efforts?
- ebarbera4 years ago
Staff
Raveees -
Try taking a look here https://community.smartbear.com/t5/TestComplete-Questions/Run-failed-Tests-again/m-p/160709 they reference a solution which is in Russian but can be translated with google.
Hopefully this helps.
Emma - Mr_Bro4 years agoFrequent Contributor
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 #-------------------- #-------------------