> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Run a performance test with a mock

> Redirect a collection's requests to a mock during a performance test so the run generates load against mock responses instead of reaching the real endpoints.

You can redirect the collection's requests to a [mock](/docs/design-apis/mock-apis/local-mock-servers) during a performance test using the **Mock** tab in the Collection Runner. For each base URL in the collection, you can select a different mock. Requests to a mapped base URL go to the mock instead of the real endpoint, so the test generates load against mock responses rather than sending that traffic to a real service.

> **Info**
>
> The **Mock** tab is available in the [Postman desktop app](/docs/getting-started/installation/install-app/) only, in [Cloud View](/docs/use/native-git/overview/), and only when you select the **App** or **Postman CLI** run method. (Performance tests aren't available in Local View.) Mocks apply to these local runs only. You can't redirect requests to a mock on a cloud run.

## Select a mock for a performance run

Run a performance test with a mock to generate load against mock responses instead of reaching the real endpoints the collection calls. When you start the run, Postman redirects requests that match a selected base URL to the mock.

1. Click ![Items icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-items-stroke.svg#icon) **Items** in the left sidebar.
2. Click **Collections** and select the collection you want to run.
3. Click ![Run icon](https://assets.postman.com/postman-docs/aether-icons/v12/action-run-stroke.svg#icon) **Run**.
4. Under **Run type**, select **Performance**.
5. Under **Run method**, select **App** or **Postman CLI**.
6. Configure the performance test settings as needed.
7. Click the **Mock** tab.
8. For each base URL in the collection, use the **Select mock** dropdown list to choose a mock. To create a new mock, select ![Add icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-add-stroke.svg#icon) **Create mock** from the dropdown list. Postman identifies all requests using that base URL and uses them in the mock's [implementation](/docs/design-apis/mock-apis/local-mock-servers#customize-your-mock).
9. (Optional) Next to each mock dropdown list, select a scenario with specific request handling code, endpoints, and conditions. To learn more about scenarios, see [Manage scenarios in a mock](/docs/design-apis/mock-apis/local-mock-servers#manage-scenarios-in-a-mock).
10. Start the run. If you selected the **App** run method, click **Start run**. If you selected the **Postman CLI** run method, copy the generated command and run it in your terminal.

> **Note**
>
> You can also redirect requests to a mock without the **Mock** tab by using the `--use-mock` option with the [`postman performance run` command](/docs/postman-cli/postman-cli-monitoring/#postman-performance-run), such as in a CI/CD pipeline. Like the **Mock** tab, this applies to local runs only.

After the run completes, you can [view performance test metrics](/docs/tests-and-scripts/performance-testing/performance-test-metrics/) for the run.