3. Modify Functional Test

Applies to ReadyAPI 3.52, last modified on April 18, 2024

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.

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 ().

  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

    Click the image to enlarge it.

  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

    Click the image to enlarge it.

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

    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

Watch the video
 
Highlight search results