Forum Discussion

mgroen2's avatar
Super Contributor
6 years ago

transfer result of a Groovy script to HTTP script

I have following question:

I created a JDBC request, and a Groovy script.
In the Groovy Script, in field Custom Properties, the property with name "result" contains the result (87654322 in this case).

Now I want this value (87654322) to be transferred to the following HTTP request.

So that the HTTP request would be like:

How can I transfer the result of the Groovy script to the HTTP script?

attached is the exported project.


2 Replies

  • avidCoder's avatar
    Super Contributor

    You can create a Properties variable as VALUE and store this 87654322 to value using this code:-


    testRunner.testCase.testSuite.project. setPropertyValue(“VALUE”, value)

    And after this create groovy script where you call the URL - and append the VALUE using java code (i.e def URL) and create one more Properties step and name it as URL, then set URL using this code:-['URL'].setValue(URL)

    Now in the address path  just mention this code:-


    Hope this helps you out.



    • Olga_T's avatar
      SmartBear Alumni (Retired)

      Hi all,


      Thank you for your suggestion, avidCoder!


      mgroen2, have you had a chance to follow the above instructions on your side? Is your question answered, or, do you have any additional information for us here?
      We are looking forward to hearing from you.