Record Test Case Tutorial
In this tutorial, you record a simple interaction with a website and generate a test case from it.
1. Open the Discover API dialog
From the main menu, select File and then New Empty Project.
In the Navigator, click next to the APIs node, and select Discover API.
Select Use the built-in browser and click Add API to start recording.

2. Specify definition
In the Discover API dialog, enter
https://petstore.swagger.io/v2/swagger.jsonin the Enter URL or choose file field and click Add and Record.Tip
A definition file lets you filter recorded requests and display only those sent to the specified web services.

3. Record requests
ReadyAPI opens the Recording Overview dialog when the test recording starts.
In the Recording Overview dialog, enter
https://petstore.swagger.io/in the URL field and click Go.
In the pet Everything about your Pets section, expand the GET method for the
/pet/findByStatusresource and click Try it out.
In the status parameter field, select available and click Execute.

Scroll down to the Responses section and locate the response body. A list of pets represented by the
Petobject. Copy the value of theidelement.
Go to the store Access to Petstore orders section, click the POST method for the
/store/orderresource, and click Try it out.
In the sample request body, paste the copied pet ID into the
petIdparameter. For thequantityparameter, enter1. Click Execute to send the request.
ReadyAPI sends the request and displays a 200 server response, confirming the order was placed successfully.

Note
The next section covers generating a test case from these recorded requests.
4. Create test
After you record the scenario, you can generate a test case.
Click Generate services.

In the Generate Services dialog, select the Generate Test Case option, and click OK.

In the Create Test Suite dialog, enter a name and click OK.
In the Create Test Case dialog, enter a name and click OK.
Select Close REST Discovery and click OK.

ReadyAPI creates a test case with a sequence of recorded requests.
