Forum Discussion
ccdssv1
12 years agoContributor
Hi
This will be a simple script that's do what you say:
//xml processing libray
import com.eviware.soapui.support.xml.XmlUtils
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
//replace the <TestStepName> with the actual test name
xmlResponseHolder = groovyUtils.getXmlHolder("<TestStepName>#ResponseAsXML")
xmlBody = new XmlSlurper().parseText(xmlResponseHolder .getXml())
errorCode = xmlBody.aca[0].@errorCode
log.info errorCode
this should do what you ask for
This will be a simple script that's do what you say:
//xml processing libray
import com.eviware.soapui.support.xml.XmlUtils
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
//replace the <TestStepName> with the actual test name
xmlResponseHolder = groovyUtils.getXmlHolder("<TestStepName>#ResponseAsXML")
xmlBody = new XmlSlurper().parseText(xmlResponseHolder .getXml())
errorCode = xmlBody.aca[0].@errorCode
log.info errorCode
this should do what you ask for
Related Content
Recent Discussions
- 15 years ago