Forum Discussion
jmistrik
14 years agoOccasional Contributor
depends where "do the variables belong"
- you choose a scope eg. custId (i believe it is sth like customerID) in TestCase scope, if you need the custId visible in all teststeps
Lets have the example on TestCase scope - you go to Custom Properties tab in soapui (left bottom corner), create there a property (variable) you need = "custId" with value "1111". Then this variable is accessible in all testSteps:
{
"eventType": "check",
"emailAddress": "email@emailtesting.com",
"source": "mobile",
"customerSegment": "gold",
"custId": "${#TestCase#custId}" [-> will expand to 1111]
}
- you choose a scope eg. custId (i believe it is sth like customerID) in TestCase scope, if you need the custId visible in all teststepsLets have the example on TestCase scope - you go to Custom Properties tab in soapui (left bottom corner), create there a property (variable) you need = "custId" with value "1111". Then this variable is accessible in all testSteps:
{
"eventType": "check",
"emailAddress": "email@emailtesting.com",
"source": "mobile",
"customerSegment": "gold",
"custId": "${#TestCase#custId}" [-> will expand to 1111]
}