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 in the Postman sidebar and select
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:
If Postman detects Playwright tests in your code during the linking process, it automatically adds the application workspace tag to the Application Inventory.
Install the latest version of the Postman CLI if you don’t already have it:
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.
Install the Postman Playwright plugin:
You can enable network capture in one of two ways. Postman recommends using withPostman because it requires only a one-time configuration change and works across all pages, contexts, and fixtures.
Add withPostman to your Playwright configuration:
The withPostman function enables Playwright’s built-in JSON reporter and trace recording. The Postman CLI reads these artifacts (playwright-report.json and trace.zip) to analyze network traffic. No changes to your test code or custom data pipeline are required.
This approach requires only a one-time configuration change and provides broader capture coverage. However, test runs might take longer because Playwright must generate and store JSON reports and trace data.
You can also enable capture by wrapping Playwright’s test object with attachNetworkCapture:
This approach has lower runtime overhead because it doesn’t rely on Playwright trace artifacts. However, it requires updating each test file or creating a shared wrapper that re-exports the wrapped test object.
The attachNetworkCapture function only captures traffic from Playwright’s built-in page object. The function won’t capture traffic from pages created manually inside a test, such as pages created with browser.newContext() and context.newPage().
For example, network traffic from this manually created page won’t be captured by attachNetworkCapture:
Initialize your project as an Application Inventory application and run your tests.
Run the initialization command to set up your project:
This command does the following:
postman.config.cjs file that links your application to Postman.Review the generated postman.config.cjs to ensure the configuration matches your project structure.
To exclude irrelevant URLs, methods, and headers, update the filters configuration in postman.config.cjs:
Run your UI tests using the Postman CLI:
For local testing, append CI=true to capture test results in the Application Inventory:
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.
If you don’t have existing API tests, you can generate collections from observed network traffic:
This workflow:
The same UI traffic that validates your APIs can become the foundation for a comprehensive API contract suite.
You can view your test results and discovered dependencies in the Application Inventory. Click Home in the Postman sidebar and select
Application Inventory.