Let’s see how to add test steps to test cases and to change request parameters. We will modify “/pet/findByStatus-Request 1 Test Case” . We will add a REST Request test step to it and then set parameters of this request.
Switch to SoapUI.
In the Navigator tree on the left, expand the /pet/findByStatus-Request 1 Test Case node.
Right-click the node and select Add Step > REST Request from the context menu:
In the subsequent dialog box, enter the test step name, for example, Request 2:
Next, ReadyAPI will invoke the dialog, where you need to select the template request for the test step you are creating. As you can see, the dialog displays two items that match the
findByStatus request. The difference between them is that the first matches to a request with parameters set in the web service definition, and the second matches the template request defined in the project:
Select any of these items and click OK. The request will be added to the test case:
Now, we have two requests that simulate the same operation. Let’s change their parameters so that the requests return different sets of data:
In the Navigator tree, select the GET Request test step.
In the request editor, click somewhere within the Value cell of the status row and type available. Press Enter to confirm the change.
It is important to press Enter in order for the changes to take effect.
Similarly, select the second request in the test case, and enter sold in the Value cell for the status parameter. Press Enter to confirm the change:
Now, we are ready to run our test case. We will do this on the next step.