Contributions
- 667Views0likes0Comments
Insert xml snippet into a request
I am trying to read an xml snippet from a file and insert it into a specific xml request. I have went over the user guide http://www.soapui.org/userguide/functional/groovystep.html, but this is not really helping me very much. I am able to get the xml out of the file into a string, but I don't know where to go from there (how to get the xml snippet into a request). Thanks, Brandon1.5KViews0likes2CommentsFrozen ui when running teststeps within groovy
If I do testRunner.runTestStepByName(testStep) from within a groovy script the ui is frozen as if it has to wait until the request is finished to update the swing components, logs, and etc. Is there any way around this without having to spawn off a new testRunner class and all?1.5KViews0likes3CommentsHow do I add child nodes with xmlUtils?
I have code currently that grabs the parent node I need. I would like to add child nodes to this parent. I remember a methods in javaScript to do this, but not sure how to do it in the soapui api. I think this is the method that I would need. public static org.w3c.dom.Element addChildElement(org.w3c.dom.Element element, java.lang.String name, java.lang.String text) However, I am not sure how to create the element to give to this method.2.4KViews0likes2CommentsProblems 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. 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, Brandon1.7KViews0likes1Comment