Skip to content

Instantly share code, notes, and snippets.

@infomaven
Last active June 9, 2024 06:01
Show Gist options
  • Select an option

  • Save infomaven/e2b57863b63140ed3958656917e74faa to your computer and use it in GitHub Desktop.

Select an option

Save infomaven/e2b57863b63140ed3958656917e74faa to your computer and use it in GitHub Desktop.
SoapUI OSS - Demo Postman

Demo Postman Collection Import

Prerequisites (2)

  1. "ReadyAPI Postman" plugin - Normally this is bundled with a standard open source installation, but if using an older version of SoapUI or a custom setup, it is possible to be missing.
- If present, it will be found under `$HOME  > .soapuios > plugins`   (.soapuios is a hidden folder)
- In the SoapUI gui, if the plugin is installed, it will show under File menu as `Import Postman collection`
   > If you do NOT see these attributes, try _uninstalling_ SoapUI and re-installing under your current computer user account. 
  1. Postman Collection file - This must use the Postman v1 schema. If your collection file is not using v1 schema, you will get an error when you try to import it. See details below.

Import Postman Collection to SoapUI

When parsed by SoapUI, Postman collections will be converted into a full Project rather than a web service Interface.

  • The import does not work with a url. You must save the json ocally before importing.
  1. In soapui, open File menu. There should be an option for "Import Postman Collection"

  2. Click 'import postman' to import the saved collection file

    SoapUI will create a new Project in the workspace bearing the same name as the collection. You should be able to see an Interface in the Project tree, and there should not be any error messages shown.

    If error message looks like this -> "net.sf.json.JSONException: JSONObject["return"] is not a JSONArray" Your collection is using a v2 schema. You'll need to convert it to v1.

Fixes for wrong schema

Postman Labs Tool Usage

Postman Labs utility - format conversions

A sample command (v2 -> v1)
```
$ sudo postman-collection-transformer convert \
    --input ./RESTListicator\ v1.postman_collection.json \
    --input-version 2.0.0 \
    --output ./1.0.postman_collection.json \
    --output-version 1.0.0 \
    --pretty \
    --overwrite
```
command for v21 to v1 conversion
sudo postman-collection-transformer convert \
    --input ./RESTListicator\ v1.postman_collection.json \
    --input-version 2.1.0 \
    --output ./1.0.postman_collection.json \
    --output-version 1.0.0 \
    --pretty \
    --overwrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment