VTest
12 years agoOccasional Contributor
Not able to Parse response xml
Hi ,
I have two test steps, one for database connnection , the second one is rest request.
i am unable to get the response from the groovy script , if the request is one step above the groovy script,
the order of the test steps
1) SOAP REST REQUEST
2)JDBC CONNECTION STEP
3)Groovy Script.
In groovy script if i run requests 1,2 i am able to parse only request 2 , i am not able to parse the request 1 response , for some reason i get namespace not defined error.
if i remove my database connection request step(2), then i am able to parse the response 1(request 1) without any errors.
Could some one help , to receive the request from the two test requests as xml and parse both of them, the piece of code i used is
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
testRunner.runTestStepByName("Teststep1")
def Holder1 = groovyUtils.getXmlHolder("ResponseAsXml")
testRunner.runTestStepByName("Teststep2")
def Holder2 = groovyUtils.getXmlHolder("ResponseAsXml")
Everything i am trying to do in onetestcase but different test steps.
I have two test steps, one for database connnection , the second one is rest request.
i am unable to get the response from the groovy script , if the request is one step above the groovy script,
the order of the test steps
1) SOAP REST REQUEST
2)JDBC CONNECTION STEP
3)Groovy Script.
In groovy script if i run requests 1,2 i am able to parse only request 2 , i am not able to parse the request 1 response , for some reason i get namespace not defined error.
if i remove my database connection request step(2), then i am able to parse the response 1(request 1) without any errors.
Could some one help , to receive the request from the two test requests as xml and parse both of them, the piece of code i used is
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
testRunner.runTestStepByName("Teststep1")
def Holder1 = groovyUtils.getXmlHolder("ResponseAsXml")
testRunner.runTestStepByName("Teststep2")
def Holder2 = groovyUtils.getXmlHolder("ResponseAsXml")
Everything i am trying to do in onetestcase but different test steps.