How do I set the status of a Script Assertion?
After looking at this documentation, GroovyScriptAssertion (SoapUI 3.0.0 API) (smartbear.com), I've tried the following
def currentStep = context.getCurrentStep();
def assertion = currentStep.getAssertionByName('Script Assertion');
assertion.setStatus(com.eviware.soapui.model.testsuite.Assertable.AssertionStatus.FAILED);
but I get the error
setStatus() exception: groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.setStatus() is applicable for argument types: (com.eviware.soapui.model.testsuite.Assertable$AssertionStatus) values: [FAILED]
If I output
assertion.getClass()
It tells me that assertion's class is
com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion@71d72a30
What am I doing wrong? I'm using 5.7.1
Edit:
If it's not possible to set the status of a test assertion or test step, is it possible to set the status of a testCase?