Forum Discussion
Thanks for responding.
Let's say at the begining, member login so will call this "Login" API. It requires two parameters: username and password. But I won't include the parameters in the GUI window below because I will add the parameters to the parameter table when on the Ready! API main screen under "Projects" tab, for example "Dashboard", "Projects", "SoapUI NG", "Secure", "LoadUI NG", "ServiceV".
Next let's say getting the transaction information of the member by calling API below.
After calling the Transaction API, the response will be in JSON format that has different types of categories in the form of transactionId which is just a hex value. So I save one of the transactionId value to Global Property.
So finally to get details on the transaction, will require to pass in that Global Property into {Category} for the call below.
Thanks.
- PhillipB7 years agoOccasional Contributor
It seems if I apply the Global Property value directly into "{Category"} during this GUI window "Add REST Request Test Step From URL", the Gobal Property value will not get passed into "{Category}". So to solve that, I have to use the previous test step reponse value like this.
http://<domainName>/Members/Transactions/{PreviousTestStepName#Response#$.Data[0]}/Date
Then after that, back on the Ready! API main screen where it has "Projects" tab, I will replace this
{PreviousTestStepName#Response#$.Data[0]}
with the Global Property variable.
Not sure if this is the correct way to do it.
- PaulMS7 years agoSuper Contributor
You probably can't use property expansion for a global property in the window "Add REST Request Test Step From URL" because braces {} are special characters.
{Category} in the URL to create a new REST request refers to the template parameter name.
https://support.smartbear.com/readyapi/docs/projects/requests/parameters/types/template.html
Then in the new REST request right click in the value field for the parameter, select Get Data to get any property.
The parameter value will then be like ${PropertyName}. It looks like you have the right result in the end.
Related Content
- 3 years agoAAB