Get better API testing by using Portman

1. Install Portman

2. Initialize Portman

3. Add Default Configuration

4. Run Portman

5. Fixing Issues found in the OpenAPI spec

Error #1 — Missing URL

Error #2 — Response Schema does not match

5. Assigning Variables & Overwrites

  • openApiOperation — this is telling portman which requests should be adding this variable assigment. The structure of this is [Method]::[Path]. The method and the path can be wildcards, if we go back to the default config that we copied it uses “*::/*”, that is saying run the tests for every method and every path.
  • collectionVariables — this is specifying the name of the collection variable to be able to reference it in other requests and the responseBodyProp defines the path to get the value from the response.
  • key — where do you want to replace the value, in our case it is {productId} in the path parameter.
  • value — What is the value you want to replace it with, this can come from a collection variable or simply hardcoded. Here we are using the newProductId specified in the collectionVariables section.
  • overwrite — boolean that tells portman if it should overwrite the request path variable.



Passionate software engineer focused on cloud development.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store