Testing an API

You can create collections to use as test suites, integration tests, or contract tests for your API. These collections can be linked to a specific version of your API. You can also integrate your API with supported Continuous Integration (CI) tools.

Adding tests

You can connect a test collection to an API version you have defined in the Postman API Builder. In the Test tab, next to Tests, select Add Test.

Add API Test

You can add a new or existing test:

  • Create new test: Enter a name, configure how the collection should be generated by choosing Show advanced settings, and select Create Test.
  • Add existing test: Choose an available collection from the list and select Add Test. You will only see available collections in the list.

Adding CI integration

Postman integrates with some of the most widely-used Continuous Integration and Continuous Delivery (CI/CD) tools. After you set up CI integration for your API, you can view the status of builds or kick off a new build, all from within Postman. You can also run API tests created in Postman as part of your CI pipeline.

To set up CI integration, go to API > Test > Connect to CI/CD Builds and select the integration you want to add. To learn more about how CI integrations work, and for detailed configuration steps, see CI integrations.

CI Integration

Last modified: 2022/01/16