Run ReadyAPI Projects in TestEngine changed build result to FAILURE even after successful rerun
I'm running my suite in testengine , I used the script:
import com.eviware.soapui.model.testsuite.TestRunner.Status
def reRunCount = Integer.parseInt(testSuite.getPropertyValue("RerunCount"))
def failTestSuite = false
for ( testCaseResult in runner.results ) {
if ( testCaseResult.getStatus().toString() == 'FAIL' ){
def tRun
for (i = 0; i < reRunCount; i++) {
tRun = testCaseResult.testCase.run(null, false)
log.info("Run..." + testCaseResult.getTestCase().name)
if(tRun.getStatus().toString() == "PASS"){
runner.status = Status.FINISHED
break;
}
}
if(tRun.getStatus().toString() == "FAILED")
{
failTestSuite = true
}
}
}
if(failTestSuite)
{
runner.status = Status.FAILED
}
to rerun the filed cases and in testengine dashboard I see job status as Passed, but in Jenkins I'm getting
Build step 'Run ReadyAPI Projects in TestEngine' changed build result to FAILURE
and build is failed( report was generated before rerun and was not updated with rerun results), how can I make this Run ReadyAPI Projects in TestEngine plugin to set job to success if it Pass after rerun? thanks