Brandon_Tucker
16 years agoOccasional Contributor
Problems modifying an xml request in another TestSuite
I am trying to modify the xml of a request that lives in a complete other TestSuite. I know how to access the request in another TestSuite and execute it, but it will not allow me to modify the xml of the request. I currently have the request in the same TestStep as the groovy script that modifies the request and then runs it. For the time being, I have the following, but I would really like to move all the requests to a different TestSuite.
When I try and set testStep to the TestStep in the other TestSuite that contains the same request I get a null pointer exception on groovyUtils.getXmlHolder(testStep.name+"#Request"). I know there is probably something I am missing, but please help.
Thanks,
Brandon
def testStep = testRunner.testCase.testSteps[testStepName]
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder(testStep.name+"#Request")
holder.setNodeValue("//aps:StreetNumber", address)
holder.updateProperty()
When I try and set testStep to the TestStep in the other TestSuite that contains the same request I get a null pointer exception on groovyUtils.getXmlHolder(testStep.name+"#Request"). I know there is probably something I am missing, but please help.
Thanks,
Brandon