Forum Discussion

logesh's avatar
logesh
Occasional Contributor
17 years ago

passing value from groovy script to request

hi,

I have a condition say where x = 5 in my groovy script. Now i wanna pass this value to Request. So wat statement shud i use for this ?

like we use ${Property_name#variable+_name} when passed from properties.

Thanks.

1 Reply

  • Hi

    you can use

    context.x = 5

    and then put

    ${x}

    in your request xml.

    Alternatively write the value to a property in a properties step and then use it;

    testRunner.testCase.testSteps["Properties"].setPropertyValue( "x", "5" )

    and in your request

    ${Properties#x}

    regards!

    /Ole
    eviware.com