Applies to ReadyAPI 2.4, last modified on June 7, 2018

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.

Add Request Test Step

  1. Switch to SoapUI.

  2. In the Navigator tree on the left, expand the /pet/findByStatus-Request 1 Test Case node.

  3. Right-click the node and select Add Step > REST Request from the context menu:

    Functional web service testing with ReadyAPI: Add REST Request command

    Click the image to enlarge it.

  4. In the subsequent dialog box, enter the test step name, for example, Request 2:

    Functional web service testing with ReadyAPI: Enter request name
  5. 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:

    Functional web service testing with ReadyAPI: Add request dialog

    Select any of these items and click OK. The request will be added to the test case:

    Functional web service testing with SoapUI: New request in the test case

Modify Request Parameters

Now, we have two requests that simulate the same operation. Let’s change their parameters so that the requests return different sets of data:

  1. In the Navigator tree, select the GET Request test step.

  2. In the request editor, click somewhere within the Value cell of the status row and type available. Press Enter to confirm the change.

    Functional testing of web services with ReadyAPI: Set parameter values

    Click the image to enlarge it.

  3. 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:

    Functional testing of web services with ReadyAPI: Set parameter values

    Click the image to enlarge it.

Now, we are ready to run our test case. We will do this on the next step.

Prev     Next

See Also

Creating Your First Functional Test
REST Request Test Step
Managing Test Steps
Test Case Editor

Highlight search results