Create a payload on groovy and call a step passing it
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022
06:34 AM
08-03-2022
06:34 AM
Create a payload on groovy and call a step passing it
Hi all,
I want to create a payload on groovy and call a step passing this payload
I need to do something like this:
GROOVY CODE:
<code>
def step = testRunner.testCase.testSteps["POST XPTO"].name;
def _from = "XXX";
def _to = "YYY";
testRunner.runTestStepByName(step, _from, _to)
</code>
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022
02:08 AM
08-04-2022
02:08 AM
Hi,
I haven't tried to 'push' values into a payload, but I have 'pulled' values in to a payload using Groovy script.
Take this test case as an example...
The first two items just return strings to use as the From and To values.
E.g. From....
and To.....
These groovy scripts must come before the request.
Then, in the payload of the request, you can 'pull' these values in.
