How to rerun a failed test item for a given iteration count.
I tried using a skip variable if the item passes and then execute the next item.
Whereas, if test item fails the iterator does not work and execution continues to the next item in the list.
I've used "Runner.Stop(True)" to stop execution if the test fails at any point, rather than enabling the "Stop on error" setting
Also, to ignore the current test case if it is already passed in the first iteration
Code Snippet to skip if test case is passed which will ignore the iteration (if iteration count is more than 1)
Function SkipExecutionifPASS(TestCaseName) ResultfromPreviousRun = GetTcResult(TestCaseName) If ResultfromPreviousRun = "PASS" then Log.Message(TestCaseName&" is skipped") Runner.Stop(True) End If End Function
How can I instruct TC to execute the failed test case till the maximum iterations defined from the "Count" setting in project "Test Items" screen
-Rajesh VV
I don't think TC have that ability to do that as it is kind of Custom requirement.
What you can do is, Instead of doing this thru TestItem you can create a Custom function that controls this execution.