Integrate your test suite with the Application Inventory

View as Markdown

Application Inventory is available on Postman Solo, Team, and Enterprise plans. For more information, see the pricing page.

Postman’s Application Inventory integrates with your existing UI test suite to validate API interactions and discover dependencies automatically. This guide walks through setting up your first application and running tests with network capture.

The exact integration flow depends on whether you’re connecting your workspace or linking an application to an existing workspace. The key difference is that for new workspace connections, the setup process is guided and happens automatically when you link your repository.

For existing workspace connections, you need to create an application from the Application Inventory and initialize your application using postman app init to complete the setup. To access the Application Inventory, click Home icon Home in the Postman sidebar and select App icon Application Inventory.

You have to be on your Postman desktop app to complete this step.

To connect your application repository to a Postman workspace, do the following:

  1. Navigate to your Postman workspace.
  2. If not already linked, connect your repository. From the Postman sidebar, click Folder icon Files > Open folder. See Connect your Git project to your workspace for more details on Postman’s Git integration.
  3. Complete the repository linking process.

If Postman detects Playwright tests in your code during the linking process, it automatically adds the application workspace tag to the Application Inventory.

Step 2: Install the Postman CLI

Install the latest version of the Postman CLI if you don’t already have it:

$npm install -D postman-cli

Step 3: (Optional) Add API tests to your workspace

If you already have Postman Collections that represent your API contracts, add them to your workspace. To learn more about writing tests in Postman, see Write scripts to test API response data in Postman.

Step 4: Set up the capture plugin

Install and configure the Playwright network capture plugin:

$npm install -D postman-playwright

To import the plugin in your test files, do the following:

1import { test as baseTest, expect } from '@playwright/test';
2import { attachNetworkCapture } from 'postman-playwright';
3
4const test = attachNetworkCapture(baseTest);
5
6test('has title', async ({ page }) => {
7 await page.goto('https://playwright.dev/');
8 await expect(page).toHaveTitle(/Playwright/);
9});

Step 5: Initialize and run your application tests

Initialize your project as an Application Inventory application and run your tests.

Initialize your application

Run the initialization command to set up your project:

$postman app init

This command does the following:

  • Analyzes your project’s file structure.
  • Allows you to select your test command, collections, and environment for your default target.
  • Creates a postman.config.cjs file that links your application to Postman.
  • Declares the UI test command, available targets, and filter rules for captured traffic.

Review the generated postman.config.cjs to ensure the configuration matches your project structure.

Filter out irrelevant traffic

To exclude irrelevant URLs, methods, and headers, update the filters configuration in postman.config.cjs:

1filters: {
2 urlPatterns: ['fonts.googleapis.com', 'localhost:3007', 'fonts.gstatic.com'],
3 methods: [],
4 headers: {},
5},

Run the tests

Run your UI tests using the Postman CLI:

$postman app test

For local testing, append CI=true to capture test results in the Application Inventory:

$CI=true postman app test

Collections and environments are selected from the targets defined in postman.config.cjs. You can override them at runtime using the --target, --target-environment, and --target-collection options.

Results appear in the terminal. If you are logged in and the workspace has been added to the Application Inventory, results are also pushed to the Application Inventory.

If you’re not in a CI environment, Postman doesn’t collect test results.

(Optional) Bootstrap collections from captured traffic

If you don’t have existing API tests, you can generate collections from observed network traffic:

$postman app test --capture-only

This workflow:

  • Captures traffic during UI test runs.
  • Generates a draft Postman Collection from observed requests.
  • Uses AI to help create assertions from captured responses.
  • Allows you to refine the tests and reuse them in future runs.

The same UI traffic that validates your APIs can become the foundation for a comprehensive API contract suite.

Next steps

You can view your test results and discovered dependencies in the Application Inventory. Click Home icon Home in the Postman sidebar and select App icon Application Inventory.