Skip to main content

Importing HAR files and HAR files from RDC or VDC

If you have an HTTP Archive (HAR) file or you have tested using Real Device Cloud (RDC) or Virtual Device Cloud (VDC), you can import it directly into API Testing on Sauce Labs and use it to generate tests.

What You'll Need

note

Looking to import from a spec file? See Building a Test from a Spec File.

Importing a HAR File

You can import a HAR (HTTP Archive) file into API Testing to automatically generate a functional test.

To import a HAR file:

  1. In Sauce Labs, click API Testing.

    Navigating to API Testing
  2. On the Projects page, under the project, you want to import the file to, click HTTP Client.

    Navigating to the HAR import modal
  3. On the HTTP Client page, click Import OpenAPI/Postman, then click Import OpenAPI/Postman Collection/.har and then, select and upload your HAR file from your local machine.

    Navigating to the HAR import modal
  4. Click the folder in your Snapshots tree where you'd like to save your file.

    Routes Rendered
  5. Click Save.

    Import file to Project
  6. The routes from your file will now show in the list of saved requests.

  7. In the folder, click on a snapshot to view its details in the response panel.

  8. To create a test based on the imported file, click Generate Test. For more information about creating a test, see Create a Test.

Importing a HAR File from RDC and VDC

You can import a HAR (HTTP Archive) file into API Testing to automatically generate a functional test from RDC or VDC. Network Traffic Capture and Extended Debugging must be enabled to use this feature. See Network Traffic Capture and Enabling Extended Debugging for more information.

To import a HAR file:

  1. In Sauce Labs, click API Testing.

    Navigating to API Testing
  2. On the Projects page, under the project, you want to import the file to, click HTTP Client.

    Navigating to the HAR import modal
  3. On the HTTP Client page, click Import OpenAPI/Postman, and then click Import Har from RDC Job or Import Har from VDC Job.

    Navigating to the HAR import modal
  4. In the Import Snapshots window, click a test in the list and then click Import. You can filter this list by job owner or job type.

    Import the file
  5. In the Snapshots panel, navigate to a folder and then click Save.

    Selecting a folder
  6. When the import is complete, in the Snapshots panel, open the folder you imported the files to.

  7. In the folder, click on a snapshot to view its details in the response panel.

    Viewing call details
  8. To create a test based on the imported file, click Generate Test. For more information about creating a test, see Create a Test.

More Information