Posts

Generate Logs in SOAP UI using TearDown Script

def step_a = ""; for (testStepResult in testRunner.getResults() ) { def testStep = testStepResult.getTestStep() step_a = step_a + "TestStep [ " + testStep.name + " ] finished with status " + testStepResult.getStatus().toString() + "\n" //log.info testStep.testRequest.response.responseHeaders if (testStep instanceof com.eviware.soapui.model.testsuite.Assertable) { for( assertion in testStep.assertionList ) { def messages = "" def isAssertionLogged = false for( message in testStepResult.getMessages() ) { if(message.contains(assertion.name)) { messages = messages + testStep.name + "- Error [" + message + "]" + "\n";; isAssertionLogged = true break } } if(isAssertionLogged) //if there is no error message for the assertion, the assertion is either passed (VALID) or was not ran (UNKNOWN) { step_a = step_a + "Assertion [" + assertion.label + "] has status [FAILED]" + "\n"; step_a = ...