Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 21061

How to get a groovy variable in a REST request?

$
0
0

I have a groovy script that defines multiple varibles, and I want to grab the variables in REST request. How can I do this?

 

Example:

 

GS_Example

def var1="1"

def var2="2"

 

REST_Example

"var1": "${GS_Example#var1}"

"var2": "${GS_Example#var2}"

 

I do not think this is the correct way to do it? When I right click to add data, I get two options ending with either #result or #script but not for the variables themselves.


Viewing all articles
Browse latest Browse all 21061

Trending Articles