Script Assertion
//Define Groovy Utils and holder for validating the XML reponse content
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)
//Define the NameSpace
holder.namespaces["ns"] = "http://www.webserviceX.NET/"
//Get the Value of the Node 'ConversionRateResult' and assign to a variable
def conversionRate = holder.getNodeValue("//ns:ConversionRateResult")
//print the value of the conversion rate in the Output pane
log.info "The conversion value from USD to INR is " + conversionRate
//Comparing the value to print 'Pass' or 'Fail'
if(conversionRate=="63.7854")
{ log.info "Pass" }
else
{ log.info "fail"}Last updated