> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Integrate your test suite with the Application Inventory

<Info class="plan">
  Application Inventory is available on Postman Solo, Team, and Enterprise plans. For more information, see the [pricing page](https://www.postman.com/pricing/).
</Info>

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`](#step-5-initialize-and-run-your-application-tests) to complete the setup. To access the Application Inventory, click <img alt="Home icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-home-stroke.svg#icon" width="20px" /> **Home** in the Postman sidebar and select <img alt="App icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-entity-app-stroke.svg#icon" width="20px" /> **Application Inventory**.

## Step 1: Link your application to a workspace

<Tip>
  You have to be on your Postman desktop app to complete this step.
</Tip>

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 <img alt="Folder icon" src="https://assets.postman.com/postman-docs/aether-icons/entity-folder-stroke.svg#icon" width="16px" role="img" /> **Files > Open folder**. See [Connect your Git project to your workspace](/docs/agent-mode/native-git#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:

```bash
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](/docs/tests-and-scripts/write-scripts/test-scripts).

## Step 4: Set up the capture plugin

Install and configure the [Playwright network capture plugin](https://www.npmjs.com/package/postman-playwright):

```bash
npm install -D postman-playwright
```

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

```javascript
import { test as baseTest, expect } from '@playwright/test';
import { attachNetworkCapture } from 'postman-playwright';

const test = attachNetworkCapture(baseTest);

test('has title', async ({ page }) => {
  await page.goto('https://playwright.dev/');
  await expect(page).toHaveTitle(/Playwright/);
});
```

## 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:

```bash
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`:

```javascript
filters: {
  urlPatterns: ['fonts.googleapis.com', 'localhost:3007', 'fonts.gstatic.com'],
  methods: [],
  headers: {},
},
```

### Run the tests

Run your UI tests using the Postman CLI:

```bash
postman app test
```

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

```bash
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.

<Note>
  If you're not in a CI environment, Postman doesn't collect test results.
</Note>

## (Optional) Bootstrap collections from captured traffic

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

```bash
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 <img alt="Home icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-home-stroke.svg#icon" width="20px" /> **Home** in the Postman sidebar and select <img alt="App icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-entity-app-stroke.svg#icon" width="20px" /> **Application Inventory**.