Working With Postman

Applies to ReadyAPI 3.52, last modified on April 18, 2024

Postman is a REST client that runs as an application in the Chrome browser. You can use it to create API definitions, and then group new definitions in collections. You can then import these collections to ReadyAPI.

In October 2023, ReadyAPI updated the Postman Plugin to 3.0.0. This update enhances ReadyAPI's capability to import Postman Collections. Key features of this release include:
  • Updated support for Postman 2.1 Collections (formerly supporting 2.0).
  • The Postman plugin aligns with the latest version of ReadyAPI.
  • Comprehensive test coverage is implemented to ensure the maintenance and monitoring of this feature.

Please note: Postman Plugin version 3.0.0 is compatible only with ReadyAPI 3.49.0 and higher. Users with lower versions won't be able to use version 3.0.0. It is recommended to upgrade to version 3.49 if migrating from Postman and intending to use Plugin 3.0.0.

To learn more about specific issues addressed in this release, refer to Postman 3.0.0.

Requirements

  • The collection you import should use local variables. Environment variables are not stored in the collection files, so you cannot import them in ReadyAPI.

Install the plugin

To import the collection to ReadyAPI, first, you need to install the Postman support plugin.

  1. Open the Integrations tab:

    ReadyAPI: Select the Integrations tab

    Click the image to enlarge it.

  2. Find ReadyAPI Postman Plugin and click Install.

  3. Confirm that you want to download and install the plugin.

    ReadyAPI will do that now.

  4. Restart ReadyAPI.

You can now import your Postman API definitions.

Export a Postman collection

To start working with a Postman collection in ReadyAPI, you need either to get a link to it or to save it as a file.

Save as a file
  1. Click the ellipsis button (...) next to your collection and select Export.

    Export the Postman collection

    Click the image to enlarge it.

  2. Select version to which you want to export the collection and click Export.

    Select version of the Postman collection
    Postman no longer provides the option to export V1. The Postman application allows users to export only as V2 or V2.1. V1 Collections version is deprecated in ReadyAPI. It is recommended that users export their V1 collection as 2.X.
  3. Select the location you want to save the collection to and click Save.

Import a Postman collection

To import a Postman collection to ReadyAPI:

  1. Select File > Create Project via Integration .

  2. In the dialog that appears, switch to the Integration tab and click Postman collection.

    ReadyAPI: Importing a Postman collection

    Click the image to enlarge it.

  3. Paste the link to your Postman collection, or click Browse and select the Postman collection to be imported.

  4. Click OK.

ReadyAPI will create a new project and import all APIs in the collection. If the collection has tests, ReadyAPI will create a new SOAP or REST Request test step in functional tests for each API definition with tests.

Conversion rules

ReadyAPI project structure is different from the Postman collection structure, so it has several conversion rules.

  • API requests are converted to API definitions on the Projects page.

  • Requests with unsupported HTTP methods are skipped and a message is posted in the log.

  • Collection variables, as well as global variables set in the preRequestScript and tests elements, are converted to custom project properties.

  • The {{property}} elements in request URLs and the globals["property"] elements in scripts are converted to property expansions (${#Scope#property}).

  • Request headers are converted to HEADER request parameters.

  • If the collection has any tests, ReadyAPI will create a test case with a REST or SOAP request test step for each request with tests in the collection.

  • Assertions are created for all the corresponding elements in tests:

    • tests["Status code is 200"] = responseCode.code === 200 is converted to Valid HTTP Status Codes assertion.

    • tests["Status code is not 401"] = responseCode.code !== 401 is converted to Invalid HTTP Status Codes assertion.

    • tests["Response time is less than 300ms"] = responseTime < 300 is converted to Response SLA assertion.

    • tests["Body is correct"] = responseBody === "abc def" is converted to Equals assertion.

    • tests["Body matches string"] = responseBody.has("abc") is converted to Contains assertion.

    • tests["Content Type is present"] = postman.getResponseHeader("Content-Type") is converted to Script assertion.

Limitations
  • Currently, ReadyAPI supports only the older style of the script syntax.

  • Postman does not store environments in the collection file, so your environments from Postman will not be imported to ReadyAPI.

Next steps

See Also

Integrations
Managing Integrations

Highlight search results