Forum Discussion

Hellotest's avatar
Hellotest
Contributor
4 years ago
Solved

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 ste...
  • ChrisA's avatar
    ChrisA
    4 years ago

    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