How to add multiple assertion for Dynamic Response
Here, i am using DataSource to take Request. If my first response contain Valid message, 2nd Response contain 'XXX' message and 3rd Response contain 'YYY' message.
Can we add multiple assertion for dynamic response and how ?
I came to know we can use Groovy script but don't know what to do in that case.
I am using below script
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def response = context.expand( '
http://xmlns.bmogc.net/MDMCEMErrorInfo/1_0' )
def refNum = response.getNodeValue("//detail[1]/out:ErrorInfo[1]/out:exceptionControl[1]/out:errorMessage[1]/text()");
if refNum == ('The Email Id is not present for the requested Portal type')
{
asser 1=1;
}
But i am facing below error
Fri Dec 05 14:10:01 EST 2014:ERROR:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script32.groovy: 7: unexpected token: = @ line 7, column 10.
assert 1=1;
^
org.codehaus.groovy.syntax.SyntaxException: unexpected token: = @ line 7, column 10.
1 error