Postman Collections

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 the created definitions in collections. These collections can then be imported to SoapUI.

Requirements

The Postman plugin is supported in SoapUI version 5.3.0.

Importing Postman Collection to SoapUI

Export a Postman Collection

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

  • In the Postman application in Chrome, select your collection and click Download.

  • Select Collection v1 export option. SoapUI does not support v2 collections.

  • Select where you want to save the collection and click Save.

Importing a Postman Collection

To import the Postman collection to SoapUI:

  • Select File > Import Postman Collection.

  • In the Import Postman Collection dialog, click Browse and select the Postman collection to import.

SoapUI will create a new project and import all APIs described in the collection. If the collection has tests, SoapUI will create new SOAP or REST Request test step 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

SoapUI project structure is different from the Postman collection structure. Here are the conversion rules:

  • API requests are converted to API definitions in the Projects tool.

  • Global variables set in preRequestScript and tests elements are converted to custom project properties.

  • All property elements in request URLs and globals["property"] elements in scripts are substituted for property expansions.

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

  • Headers are substituted for HEADER request parameters.

  • If the collection has tests, SoapUI creates a test case for it. This test case includes a REST or SOAP Request test step for each collection request that has tests.

  • SoapUI creates assertions for corresponding elements in tests, for example:

    • tests["Status code is 200"] = responseCode.code === 200 is converted to the Valid HTTP Status Codes assertion.
    • tests["Status code is not 401"] = responseCode.code !== 401 is converted to the Invalid HTTP Status Codes assertion.
    • tests["Response time is less than 300ms"] = responseTime < 300 is converted to the Response SLA assertion.
    • tests["Body matches string"] = responseBody.has("abc") is converted to the Contains assertion.
    • tests["Content Type is present"] = postman.getResponseHeader("Content-Type") is converted to the Script assertion.