Ask a Question

getAssertionStatus() in readyapi

SOLVED
niravk17
Occasional Contributor

getAssertionStatus() in readyapi

How do I can use getAssertionStatus()  for teardown script ..I have to log the status of all assertion for each test step ( considering unchecked "abort the test case if any error occur")

if any one come cross with this?

1 REPLY 1
AntonE
SmartBear Alumni (Retired)

Hello niravk17

 

The JavaDocs you are referring to are for TestServer. In SoapUI NG you should use other classes. The script to log the status of all the assertions should look like this:

 

import com.eviware.soapui.model.testsuite.TestStep
import com.eviware.soapui.model.testsuite.Assertable
import com.eviware.soapui.model.testsuite.TestAssertion

for (TestStep testStep : testCase.testStepList) {
	if (testStep instanceof Assertable) {
		for (TestAssertion assertion : testStep.assertionList) {
			log.info testStep.name + " " + assertion.label + " " + assertion.status
		}
	}
}

Anton Egorov
ReadyAPI developer
cancel
Showing results for 
Search instead for 
Did you mean: