Forum Discussion

ili's avatar
ili
Occasional Contributor
3 years ago

AssertionGroup error messages?

Hi,

On soap request I have grouped few Assertions and now I fail to retrieve the error messages. If the assertions are not grouped I successfully retrieve the message as following:

testRunner.getResults().each() { stepResult ->

     stepResult.getMessages().each() { message ->

          log.info message

     }

}
However this does not work for grouped assertions. I also noticed that Assertion Group does not create message header when you access failed request from testCase transaction log.

Something else I've tried without success is following:

for(assertionError in assertion){
      log.info assertionError.getErrorLevel().toString()
      log.info assertionError.getMessage()
}

, or also:

for(assertion in testStep.getAsertionList()) {

      assertion.DESCRIPTION //this returns the group name "Assertion Group" but don't know how to enter inside the group and print error messages from there

}

 

I would appreciate some help if someone knows how can I extract this error messages from groupAssertion using groovy script.

  • Grouping assertions in "Assertion" test step seems to return error messages.

  • ili's avatar
    ili
    Occasional Contributor

    Grouping assertions in "Assertion" test step seems to return error messages.