Forum Discussion
Hello,
I am assuming that you would to like perform these steps to achieve your test:
- Execute a REST step
- Extract IDs from JSON response (possibly a groovy script) and transfer to a TestSuite property
- Transfer or append above identified property to another Rest Step URL
If above is correct then use variable or parameterize your second rest ENDPOINT (URL)
for Ex: http://TestHost/v2/{IDs} (Resource parameter - Style TEMPLATE)
http://TestHost/v2/?{IDs} (query parameter - Style QUERY)
In second rest step point this parameter to your TestSuite Property like ${#TestSuite#updated}
Hope this helps!
Hello!
Yep, this helps, I made my tests work by changing the TestSuite property in a Script test step, everything works fine, thank you!
But the main question remains: if I can define my Script test case to be a Target for a PropertyTransfer, how do I transfer some value from the response of previous test step to a variable in the script?
Of course I understand that I can do it using script anytime, but this is just for the sake of my curiosity.
Here is a screen shot to make things more concrete: