Forum Discussion

MRutten's avatar
MRutten
Occasional Contributor
3 years ago
Solved

How define testscenario for REST requests using values of previous response as resource path.

Hello,   GOAL: My goal is to functional test the available REST services using a scenario with several steps. Each step uses values from the response of previous teststeps.    SCENARIO: - start...
  • richie's avatar
    3 years ago

    Hey MRutten 

     

    so you want to transfer the UUID value from the first request's response and pass it onto the second step's URI parameter - yes?

     

    Yeah - there's a number of ways to do this.

     

    Going with the straightforward option

     

    1 of the ways is as follows:

     

    1.  Ensure both test steps are already in your test case

    2.  Submit the first request ONLY to generate a response (displaying the UUID you need)

    3.  Within the 'Request' form of the second test step request within the UUID_REF parameter, right click in the 'Value' field (to launch the context menu) - see screengrab

     

     

    4.  Click on 'Get Data' to launch the next screenshot

    5.  In the 'Test Step' column, select the first test step in your test case, this generates the content in the 'Properties' column.  Click on the 'Response' value and click 'Add' to launch the next screenshot

    6.  Within the generated window above - click on the relevant field (the UUID) value and click on 'OK' to save and close - and that's it!

     

    If you look in the UUID URI parameter value field on the second request, its displayed value will be something like ${FirstTestStepName#Response#$['value'][0]['UUID']}

     

    Hit me back if you have any problems,

     

    Cheers,

     

    Rich