Forum Discussion

Suganya_Venky's avatar
Suganya_Venky
Senior Member
2 years ago

Only last 5 teststeps gets returned in testRunner.getResults()

Only last 5 teststeps gets returned in testRunner.getResults()

 

Code snippet:

 

log.info("Result count" + testRunner.getResults().size())  // Returns only last 5 step results whereas my testcase has 19 steps
for(stepResult in testRunner.){
def testSuite = testRunner.testCase.testSuite.name
def testStep = stepResult.testStep
def testStepName = testStep.name
def status = stepResult.getStatus()
log.info(status.toString())
log.info(testStep.config.type)
if(status.toString().equalsIgnoreCase("FAIL")){
testNode.log(LogStatus.FAIL, testStepName) 
testNode.log(LogStatus.FAIL, stepResult.getError()) 
}else
{
testNode.log(LogStatus.PASS, testStepName)
 
}
}