Suganya_Venky
2 years agoSenior Member
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)
}
}
the default value of results for a test case is 5, see "Max results" in the docs.
You need to set this value higher, either via user interface or programatically via Groovy/Java.