Using the API Testing HTTP Client, you can generate tests from external endpoints or files such as an OpenAPI Specification (spec) file.
Supported Spec Formats
- Currently supported:
- A Sauce Labs account (Log in or sign up for a free trial license).
- An existing API Testing Project. For details on how to create one, see API Testing Quickstart.
- Log in to Sauce Labs, then click API TESTING > Get Started.
- Go into any Project.
- From within a Project, click the HTTP Client tab.
- Click the Import OpenAPI / Postman button.
- Select the file on your local machine you wish to upload.
- Select the folder your Snapshots tree where you'd like to save your file.
- Click Save.
- After saving, you'll be able to view all of your endpoints under Snapshots, grouped by subdirectory. Click on the name of the request you'd like to test.
The URL will populate in the **Enter Request URL** field.
- Click Send. The response body will then appear.
Follow the instructions under our Quickstart doc, starting with the Generate Test step.
Coming soon: you'll be able to create a test by referencing the URL that points to your spec file. This feature is still available on the Legacy (On-Prem) API Fortress.