How to run a TestItem through Script?
Is there any way I can run Project TestItems by Script? for instance, I added two TestItems in list as below, after running the two items, I want to re-run the first one by my Script, Pls provide any ideas, Thanks
Solved! Go to Solution.
If my understanding is correct, you can just re-add the first script to the plan. Or, you could remove these and add another single script method which would run the first script, then second, then first again.
Some examples of Calling Project Items From Scripts .
Is there some condition to the flow?
try using Runner.CallMethod() which may be considered for your scenario.
I want to dynamic collect the failed cases after each execution plan, then re-run them for double-check whether it is a true bug, so I should totally do that by my Scripts, Thank you anyway.
You also have the option in your Execution Plan to set a test to "Stop and rerun item" on any error or exception, you can find it in the Properties panel of each test item.
You can also set this behaviour at Project level in Tools > Current Project Properties > Playback.
You can read about more approaches to re-running failed tests here : https://support.smartbear.com/testcomplete/docs/testing-with/running/control-test-flow/stop-and-reru...
Yes, This is an optional way for me, Thank you!