To Derive logical value from 2 responses
In test case below scenario
Step 1 - Get call and Response has ID
Step 2- If ID=="" (from step1) then Add call and
Response has ID
Step 3- Update Call with ID Derived from step1 or 2
If step 2 is run then ID should be from its response
Here step 3 is conditional so how can I add the ID ?
I was adding ID based on GetData feature from step 1 response but that fails if step 2 is run as latest ID is derived there.
Could you please suggest
Hi,
You could streamline this and not use setPropertyValue and getPropertyValue. I frequently update the test request steps based on some conditional, but only use custom properties very, very rarely.
From the original problem, you always run Step 3. The only thing with Step 3 is what ID to use. There's no need to disable step 3 or set custom properties.
Personally, I would create a Groovy Script prior to Step 3 which only returns the ID you want in Step 3. Nothing more, nothing less. You've already worked out the ID in a Groovy script. Simply return the ID. In Step 3, do a 'get data' to obtain the result of the Groovy Script.
The