Applies to ReadyAPI 2.2, last modified on November 17, 2017

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

  • To use the Postman plugin, you need ReadyAPI version 1.8 or later.

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

Installing the Plugin

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

  1. Click Plugins on the ReadyAPI toolbar.

    ReadyAPI: Opening the Plguins window
  2. Select Postman Plugin.

  3. Click Install/Upgrade Plugin.

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

    ReadyAPI will do that now.

  5. Restart ReadyAPI.

You can now import your Postman API definitions.

Exporting a Postman Collection

To start working with a Postman collection, you need to save it as a file:

  1. Select your collection and click Download.

    Downloading the Postman collection
  2. Select the Collection v1 export option. ReadyAPI does not support v2 collections.

    Selecting the v1 Postman collection
  3. Select the location you want to save the collection to and click Save.

Importing a Postman Collection

To import the Postman collection to ReadyAPI:

  • Select File > Import Postman Collection.

    ReadyAPI: Importing the Postman collection
  • In the Import Postman Collection dialog, click Browse.

  • Select the Postman collection to be imported.

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 SoapUI for each API definition with tests. You will be prompted to select the test case and test step name for each of these requests.

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 in the Projects tool.

  • 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 substituted for property expansions.

  • Basic authorization is converted to a request header that contains authorization information.

  • Headers are substitutes for the HEADER request parameters.

  • If the collection has any tests, ReadyAPI will create the SoapUI 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.