This worked for me:
log.info "////////////////////////////////////////////////////////"
testRunner.testCase.testSteps.each
{ name,props ->
log.info "Test step name: $name"
// check that the testStep class support assertions // (for example groovy testStep doesn't)
if(props.metaClass.respondsTo(props, "getAssertionList"))
{
// get assertionList
props.getAssertionList().each
{
// display the assertion Label Name - assertion Status - assertion Error Message
log.info " $it.label - $it.status - $it.errors"
}
}
}
log.info "////////////////////////////////////////////////////////"
>>> If you find the above solution useful then please give Kudos/Like to this message <<<