Internal Browser Discovery

Applies to ReadyAPI 3.51, last modified on March 21, 2024

You can use the built-in browser to record requests to the web site, filter the needed ones, and create an API definition from them. To define this process, ReadyAPI uses the Discovery term.

1. Start Browser Discovery

  1. Click Plusnext to the APIs node and select Discover API:

    Show image

    — or —

    Right-click the APIs section in the Navigator and select Discover API.

    Show image

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

    API Discovery: The Use built-in browser option

    Click the image to enlarge it.

  3. Click Add API to start recording.

  4. ReadyAPI will offer you to specify an API definition to filter the recorded requests. If you have a definition and want to record requests related to this API, specify the definition file and select Add and Record. Otherwise, click Record without Definition.

In either case, ReadyAPI will open the Recording Overview dialog. Make sure to select the Internal browser (HTTP, HTTPS) option in the drop-down list. You can enter the URL and start recording a request to the target service.

The REST Discovery dialog

Click the image to enlarge it.

2. Record Requests

Use the built-in ReadyAPI browser to navigate to your service. ReadyAPI sends requests in the same way a browser would and records all API calls it performs.

If your service uses many API calls, click to disable recording until you get to the web page with the API you need. Then, click again to re-enable recording.

Some websites perform API calls for extra data after the page is loaded. ReadyAPI will track these calls and record them, as well.

To view the recorded requests and responses, switch to the Transactions page.

3. Generate Service Definitions

To generate a service definition for the requests ReadyAPI has recorded:

  1. Make sure to select only the requests you need on the Transactions page. Otherwise, ReadyAPI will create API definitions for all available requests.

  2. Click Generate services.

    REST Discovery: Generate sevices

    Click the image to enlarge it.

  3. In the Generate Services dialog, select Generate Test Case or Generate Load Test to create a simple Functional or Performance test.

    The Generate Services Dialog
  4. Click OK.

ReadyAPI will generate service definitions and, if selected, ask you to name the functional test suite and performance test respectively. Then, it will inform you of the success and offer to close the Recording Overview dialog.

Make sure to deselect the Close REST Discovery option if you want to create more API definitions from requests ReadyAPI has recorded.
REST resources were successfully added

HTTPS Service Specifics

When you discover a service by using an HTTPS connection, the browser first creates a secure connection. During this process, the server sends a certificate and the browser verifies if the certificate can be trusted. If the certificate is trusted, a connection is established. If it is not, the browser displays a warning and stops creating the connection.

Internal services that are used for testing often use self-signed certificates that are not trusted by default. To work with them, enable the Self-signed certificate option in the Internal Browser properties.

Additionally, the browser can verify the hostname against the hostname provided in the certificate by using SNI and prevent connections if the certificate is issued to a different host. To disable verification, deselect the Hostname verification option in the Internal Browser properties.

These options pose a security risk when working with untrusted websites.

See Also

Discovering APIs
Using ReadyAPI as Proxy
Discovery Tutorial
Internal Browser
Creating Your First Functional Test
Tutorials and Samples

Highlight search results