> ## Documentation Index
> Fetch the complete documentation index at: https://empirical.run/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ad-hoc runs

> Trigger a one-off test run from the dashboard, CLI, or API

Use an ad-hoc run when you want to execute a suite now rather than wait for a schedule or deployment trigger.

## Dashboard

Open **Test runs** in your project, click **New Test Run**, and select an environment. The dialog also lets you:

* Run only a completed run's failed tests, when you open the dialog from that run's **Re-run with options...**.
* Override environment variables for this run.
* Run a test-repository branch.
* Choose whether to send report notifications.
* Set a [concurrency](https://empirical.run/docs/features/concurrency-limits.md) group and conflict policy.

To run specific tags, tests or projects, use the CLI or API. See [Test selection](https://empirical.run/docs/platform/test-selection.md).

## CLI

The CLI can call the test-runs API using your login:

```sh theme={null}
empirical api api/test-runs \
  --project <project-slug> \
  --method PUT \
  --field environment=production
```

## API

Use a project API key to trigger a run from a script:

```sh theme={null}
curl -X PUT https://api.empirical.run/api/test-runs \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"environment":"production"}'
```

See [From CI/CD pipelines](https://empirical.run/docs/triggers/ci-cd.md) for build metadata, variable overrides, and concurrency examples, or the [Trigger a test run API](https://empirical.run/docs/api-reference/test-runs/trigger-a-test-run.md) for every field.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.