Forum Discussion

Brandon_Tucker's avatar
Brandon_Tucker
Occasional Contributor
16 years ago

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,
Brandon

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    you could add property, for example to project named "test". And let's assume that you have stored snippet.



    context.testCase.testSuite.project.properties["test"].value = snippet // put snippet property




    And than you can use in request by property expansion. ex.: ${#Project#test}.

    robert