Reputation: 5671
I have a Groovy
script, it is present as a test step. I need to pass a parameter value, a variable from it to another Groovy
script, which is in a script assertion, in a SOAP
request. These are executed after each other. Property Transfer
step is unable to do this.
Upvotes: 2
Views: 998
Reputation: 3901
You can use this statement in Script Assertion of Request
context.testCase.setPropertyValue("Prop","testing")
So here you are setting a testcase Property.
Now you can use that property in Groovy Script
def val=context.expand('${#TestCase#Prop}')
log.info val
So the value stored in Property Prop in Script Assertion is used in Groovy Script
Upvotes: 2