3. Modify Functional Test

Let’s see how to add test steps to test cases and change request parameters. We will modify “/pet/findByStatus-Request 1 Test Case”. We will add a REST Request test step to it.

Add Request Test Step

  1. In the Navigator tree on the left, hover over the /pet/findByStatus-Request 1 Test Case node and click the hamburger button (flyout-ellipsis.png).

  2. In the flyout menu, select the REST Request test step. To find it quickly, you can start typing the name in the Search field:

    Functional web service testing with ReadyAPI: Add REST request
  3. In the subsequent dialog, enter the test step name, select the template request for the test step you are creating, clear assertion checkboxes, and click Add Test Step:

    Functional web service testing with ReadyAPI: Add Request Test Step dialog

The request will be added to the test case:

Functional web service testing with ReadyAPI: 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
  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

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

Prev Next

See Also

Publication date: