Working With Postman

Applies to ReadyAPI 3.48, last modified on September 19, 2023

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.

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
  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