Discovery Tutorial

Applies to ReadyAPI 3.53, last modified on May 15, 2024

In this tutorial, we will record a simple interaction with a web service for which we do not have an API definition.

1. Open the Discovery Dialog

To start recording requests to your service, open the REST Discovery dialog:

  1. Select File > New Empty Project and select:

    Create a new project
  2. Select Discover API in the flyout menu:

    The Use built-in browser option

    Click the image to enlarge it.

  3. Select Use the built-in browser and click Add API:

    API Discovery: The Use built-in browser option

    Click the image to enlarge it.

  4. ReadyAPI will offer you to specify an API definition to filter the recorded requests. Click Record without Definition:

    API Discovery: Recording without definition

ReadyAPI will open the Recording Overview dialog and prepare to start recording requests.

2. Record Requests

When you open the Recording Overview dialog, the recording is running.

  1. Click to pause the recording.

  2. Enter and press Enter:

    Entering the URL

    Click the image to enlarge it.

  3. Click POST in the pet Everything about your Pets resource to expand the /pet operation:

    Expanding the pet operation

    Click the image to enlarge it.

  4. The editor contains example values for the request:

    Example Value

    Click the image to enlarge it.

  5. Click Try it out to get a request body with sample values:

    Getting a sample request

    Click the image to enlarge it.

  6. Click to resume the recording.

  7. Click Execute to send the request. The website will send the request and show the response, and ReadyAPI will record the interaction. The Recorded requests field now shows that ReadyAPI records one request:

    Sending the request to the record

    Click the image to enlarge it.

On the next step of the tutorial, we will create the API definition.

3. Create Service Definitions

Now that you have recorded the actions, generate service definitions from them:

  1. Switch to the Transactions page and view the recorded requests and responses:

    ReadyAPI REST Discovery: Open the Transactions page

    Click the image to enlarge it.

  2. ReadyAPI shows the recorded request. You can click requests and responses to examine details of the recorded operations.

  3. Make sure to select the request you sent. Click Generate services.

    If you recorded several requests, clear unnecessary ones. Select only the /v2/Pet POST request with the application/json content type.
    Clicking Generate services

    Click the image to enlarge it.

  4. In the Generate Services dialog, select the Generate Test Case option to create a ReadyAPI Test test for the API you have recorded:

    Generating services
  5. Click OK and enter the test suite and test case names.

  6. ReadyAPI will add the resources to the project and show the information dialog. Select Close REST Discovery and click OK:

You have recorded the API request to the web service and can now reproduce it in ReadyAPI.

See Also

Internal Browser Discovery
Using ReadyAPI as Proxy

Highlight search results