15 years ago
Error in script assertion
Hi,
I am new to soapUI. I created a test step from a resource request where the resource has a template parameter. The template parameter is updated from the previous test step response via a property transfer. The response of the problematic test step is an xml that should contain the template parameter value. Now, I try to create a script assertion that checks if the response xml contains the template parameter. The code is as follows:
But, I keep getting the following message: "missing ; before statement". When I print both variables they are equal.
What am I doing wrong?
Thanks
I am new to soapUI. I created a test step from a resource request where the resource has a template parameter. The template parameter is updated from the previous test step response via a property transfer. The response of the problematic test step is an xml that should contain the template parameter value. Now, I try to create a script assertion that checks if the response xml contains the template parameter. The code is as follows:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder("Get_BPM_application_by_CMDB_ID#Response" )
def responseCmdbId = holder.getNodeValue( "//cmdb_id" )
def requestCmdbId = messageExchange.getProperties().get("cmdb_id", "")
assert responseCmdbId == requestCmdbId
But, I keep getting the following message: "missing ; before statement". When I print both variables they are equal.
What am I doing wrong?
Thanks