Title / Description
Code package soapui.em3.releb; import com.eviware.soapui.support.*; import com.eviware.soapui.model.testsuite.*; import com.eviware.soapui.support.XmlHolder; import com.eviware.soapui.impl.wsdl.teststeps.*; import com.eviware.soapui.support.GroovyUtils; import com.eviware.soapui.model.testsuite.TestRunContext; public class getOperation { def MATCHES="False"; def compareFunction(String testResponseName, String xpathQuery ) { def functionholder = getXmlHolder(testResponseName); functionholder.namespaces["se"] = "http://fabric.bbc.co.uk/em3/1.0/LIB_MediaAssetService/wsdl/IMediaAssetService" for ( value in functionholder.getNodeValues(xpathQuery)) { //log.info "from response:"+value for(prp in testRunner.testCase.getPropertyNames()) { if(value == testRunner.testCase.getPropertyValue(prp)){ log.info "Property matches " + value +"=="+testRunner.testCase.getPropertyValue(prp); // log.info "Testproperty:" + testRunner.testCase.getPropertyValue(prp) MATCHES = "True"; break; } } } assert MATCHES == "True" } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code