Forum Discussion
nmrao
8 years agoCommunity Hero
Ok, then it is possible, need to write code to find out all the failed cases automatically and run only those cases.
Can you specify how do you run your test cases? Using command line testrunner? or something else?
Can you specify how do you run your test cases? Using command line testrunner? or something else?
Kotaibaw
8 years agoOccasional Contributor
yes using testrunner
- Kotaibaw8 years agoOccasional Contributor
what i did for now, as a WA added 1 step in the TestSuite which contain Grovvy Script
i need the follwing:
1) how to check if testCase is failed below code
2) if its failed how to run it again using below code
def testCaseList = testRunner.testCase.testSuite.getTestCaseList()
for ( testCase in testCaseList )
{
?? check if testCase is failed and then run it
}- nmrao8 years agoCommunity HeroNeed to understand the use case little more.
How is your project structure?
Do you want run the failure cases after finishing off the project?
Or do you want to re-run the test case as soon as it is failed and repeat untill it is passed?
If it is a defect, then the test fails irrespective of how many times it is re-run unless the issue is fixed.
So, what is your case?- sanj8 years agoSuper Contributor
Here is what you need to determine if tc passed or failed