rajs2020
4 years agoFrequent Contributor
ReadyAPI - Understanding the result returned by a groovy script?
The docs say that a groovy script can return a result named as "result". See link - https://support.smartbear.com/readyapi/docs/functional/steps/groovy.html I have some test steps which run/call a...
- 4 years ago
rajs2020 : By below way you can access the result returned by Groovy Script:
def val = 1 return val;
How you can use:
${GROOVY_TEST_STEP_NAME#result}
M not sure on how to return multiple value, my guess is you can use array for it or else you can use run time context variable
set the context variable property,
context.setProperty("val1",val1)
context.setProperty("val2",val2)
How to fetch it,log.info context.getProperty("val1")
log.info context.getProperty("val2")