Forum Discussion

plaidshirt's avatar
plaidshirt
Contributor
7 years ago

Transfer parameters between Groovy scripts in SoapUI

I have a `Groovy` script, it is present as a test step. I need to pass a parameter value from it to another `Groovy` script, which is in a script assertion, in a `SOAP` request. These are executed af...
  • JHunt's avatar
    7 years ago

    Hi,

    You can use the context object to pass the value.

    // in groovy script
    context.myvar = "somevalue"
    // in script assertion
    assert context.myvar == "somevalue"

    See also the example SoapUI project file attached.