I tried looking and could find a straight forward answer anywhere.
So here are the steps:
- Set up a post request and link one of the property in request to a globalVariable created under variable section of the post request
- Create a test case with “Send request and verify” this post request
- In the body of WS.sendRequestAndVerify(findTestObject…), it will automatically show the property tied to globalVariable
- Now I create another local variable in test case, my question is how do I link this local variable with that global Variable? or do I remove that globalVariable in the reference made under WS.sendRequestAndVerify(findTestObject…) and link local variable there? If so how, what format
E.g:
some post request create api with body:
{
.
.
“{application}”:"${app}"
.
.
}
declared under post request variable, app : globalVariable.app
Now in test case it will show:
WS.sendRequestAndVerify(findTestObject(some create api, , [(‘app’) : GlobalVariable.app…])
since I am trying to run test case under test suite with data set, I have to define local variable in test case which maps to ‘app’. Lets say i declare it with the same name under variable, so do i enter ${app} instead of GlobalVariable.app in the body above? This doesn’t seem to work.
How are variables linked between request and test case?
Is there a order of precedence which code checks to pick a variable?
Thanks