Forum Discussion

jaff20's avatar
jaff20
New Contributor
11 years ago

[Resolved] Not able to assign value to the Context

Hi,

I am stuck in the middle of the project,need help

I am using groovy script to assign the paramterized value something like this

context.number="123445566"

and in my soap request i am using this to replace

<v2:GetAccountByAccountNumberRequest>
<v2:Number>${Number}</v2:Number>
<v2:Locale>EN_US</v2:Locale>
</v2:GetAccountByAccountNumberRequest


However this is NOT working, Please provide some solution how to pass the parameter value from Groovy scrip to the SOAP Request

2 Replies

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Try the following:

    add the code in groovy script which will set a test case property

    testRunner.testCase.setPropertyValue('Number','123445566')


    And in the request use as:

    <v2:Number>${#TestCase#Number}</v2:Number>