Migrating the Postman collections to HCL OneTest API

After you saved the Postman resources, you can migrate the Postman collections to HCL OneTest API. HCL OneTest API automatically converts the collections, subfolders, requests, and tests to their corresponding mapped resources in HCL OneTest API.

Before you begin

You must have completed the following tasks:
  • Read the prerequisites information before you want to migrate the Postman collections. See Prerequisites for testing the Postman collections.
  • Saved the exported Postman collections and environments files in a folder on your computer.
  • Opened a project in HCL OneTest API and the Logical View is displayed.

Procedure

  1. Click File > Migrate From > Postman Collection on the menu.
    The Select a file dialog is displayed.
    Image of the select Postman collection file dialog.
  2. Perform the following steps:
    1. Click Browse and browse to the location where you have saved the Postman collection file.
    2. Select the Postman collection file.

      For example, the saved file can be MyPostmanProject.json in the following path: D:\Projects\Postman.

    3. Click Open.

      The selected file is displayed with its full path. For example, D:\Projects\Postman\MyPostmanProject.json

    4. Select all the environments that are associated with the Postman collection by clicking Browse in the Environment Files panel.

      You can browse to the location where you saved the Postman environment files to select the files. For example, the saved file can be MyEnvironment.postman_v822_environment in the following path: D:\Projects\Postman.

    5. Click Open.

      The selected file is displayed with its full path. For example, D:\Projects\Postman\MyEnvironment.postman_v822_environment

    6. Perform any of the following actions:
      • Edit the name that is displayed in the Create Resource Under field.
        The name of the Postman file is displayed as the default name of the logical resource that is to be created.
        Note: You can retain the default name or enter a name for the logical resource to be created in the project.
      • Enter a name in place of the name that is displayed in the Create Resource Under field.
        Note: If you keep the Create Resource Under field empty, HCL OneTest API creates the resources under the logical root that is in the project.
    7. Click Next.
    The Specify how generated Operations should be processed dialog is displayed.
    Image of the select operations dialog.
  3. Perform the following steps:
    1. Select from the following options:
      Option Results

      Merge duplicate Operations

      Requests within the Postman collection that have the same HTTP method, URL, or type of authorization are created under one root operation.

      Keep duplicate Operations

      Requests within the Postman collection that have the same HTTP method, URL, or type of authorization are not merged, and individual operations are created for all requests.

    2. Click Next.
      Note: You can click Back if you want to go back to the previous dialog, and change any of the field entries.
      The Summary dialog is displayed.
      Image of the summary dialog.

      You can view the summary of the migration process that was completed in HCL OneTest API. You can find the problems listed as errors, warnings, or information. You might want to fix the warning messages that can change the way the tests were designed in Postman. The information messages summarize the resources that were processed and converted to test resources in HCL OneTest API.

  4. Click Finish to complete the migration of the Postman collection.

Results

You have successfully migrated the Postman collection into HCL OneTest API.

What to do next

You can run the tests and stubs that are created in HCL OneTest API if the migration was successful without any errors. See Running tests and stubs.

You can configure the SSL settings for the physical transport created in HCL OneTest API, if the migration has changed the SSL configuration. See Configuring SSL settings.