_ivanovich_
6 years agoFrequent Contributor
How to get JDBC teststep assertion status using groovy ?
Hi,
i have a JDBC step in my test.
In my JDBC step i added NotContains Assertion with : <ResultSet fetchSize="0"/>
So if the assertion fails the JDBC step becomes Red and the test stops.
Is it possible to write a groovy code which will get the content of ResponseAsXml property in a file inside the scritp assertion of the JDBC step?
In this way i can know what happen in my txt file
I tried this in script assertion of the jdbc step:
def testCase = messageExchange.modelItem.testCase['mytestcase'].testSteps['myjdbc'];
def result = testCase.testSteps.getPropertyValue("ResponseAsXml");
log.info result
it says: No such property: mytestcase for class: com.ewiware.soapui.impl.wsdl.testcase.WsdlTestCase
Thank you