FAQ
Answers to common Portman questions about Postman accounts, OpenAPI versions, config formats, missing operationIds, Newman and CI usage.
Short answers to the questions people ask most about Portman, the OpenAPI to Postman contract testing CLI.
What is Portman?
Portman is an open-source CLI by Apideck that converts an OpenAPI document into a Postman collection, injects contract tests, variation tests and scripts based on that document, and can upload the collection to Postman and run it with Newman. See Introduction.
Do I need a Postman account?
No. Portman generates a Postman collection file that you can import manually or run with Newman. A Postman account (free or paid) and API key are only needed if you want Portman to upload the collection with --syncPostman. See Postman sync.
Which OpenAPI versions are supported?
OpenAPI 3.0 and OpenAPI 3.1.
Do I need a config file to get started?
No. Without a Portman config file, Portman adds contract tests to every operation that check for a 2xx status, the content type, a JSON body and the JSON schema. See Quickstart.
Can I write the config in YAML?
Yes. Both the Portman config (-c) and the CLI options file (--cliOptionsFile) accept JSON or YAML. Large configs can be split across files with $ref. See Portman config.
My OpenAPI document has no operationIds. Can I still target operations?
Yes. Use openApiOperation with the method and path, like "GET::/crm/leads", including wildcards like "*::/crm/*". See targeting.
How do I test error responses?
Use variation tests to send a request with modified input and check it against a specific response code from your spec, such as 400 or 401. Fuzzing generates such invalid requests automatically from your schema constraints.
How do I chain requests, for example create then read?
Store a value from the create response with assign variables, use it in later requests with overwrites, and set the request order with orderOfOperations in globals. See the CRUD flow chaining template.
How do I pass secrets like API tokens?
Set environment variables prefixed with PORTMAN_, for example PORTMAN_BEARER_TOKEN, which becomes the Postman variable {{bearerToken}}. Use a .env file locally and CI secrets in pipelines. See Environment variables.
Can I run Portman in CI/CD?
Yes. Portman is designed to run in pipelines: keep all options in a CLI options file and run it with --runNewman. See Run Portman in GitHub Actions.