> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# testing

Create test cases and run them against your AI Agent, on the live configuration or on a change set. These are the test cases and runs of [Simulations](/docs/optimization/testing/simulations) in the dashboard.

## Commands

| Command                                            | What it does                                                                                          |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `testing cases list`                               | Lists test cases, one page at a time.                                                                 |
| `testing cases get <id>`                           | Shows one test case.                                                                                  |
| `testing cases create`                             | Creates a test case from options, or several test cases from a JSON file.                             |
| `testing cases from-conversation <conversationId>` | Drafts a test case from a real conversation. It replaces every personal value with a fake value.      |
| `testing cases update <id>`                        | Changes a test case.                                                                                  |
| `testing cases delete <id>`                        | Deletes a test case.                                                                                  |
| `testing runs list`                                | Lists the latest run of each test case on each change set.                                            |
| `testing runs create`                              | Starts runs of test cases on the live configuration or on a change set.                               |
| `testing runs get <id>`                            | Shows a run: the simulated conversation and the result of each criterion.                             |
| `testing runs compare`                             | Compares two sets of runs: the newly passing cases, the regressed cases, and the change in pass rate. |
| `testing metrics`                                  | Shows the total, passed, and failed runs, and the pass rate.                                          |
| `testing quota`                                    | Shows the daily limit of test runs, and the runs used and left today.                                 |

## Examples

Create a test case with two success criteria:

```bash
adacli acme testing cases create --name "Refund status" \
  --message "Where is my refund?" \
  --criteria "Asks for the order number" "Gives the date the refund arrives"
```

Create several test cases from a JSON file:

```bash
adacli acme testing cases create --from-json test-cases.json
```

Draft a test case from a real conversation. The draft says how to write, save, and run the test case:

```bash
adacli acme testing cases from-conversation <conversation-id>
```

Run two test cases three times each on a change set:

```bash
adacli acme testing runs create --cases tc-abc123 tc-def456 \
  --changeset <changeset-id> --repeat 3
```

Compare the live runs with the change set runs:

```bash
adacli acme testing runs compare --baseline <run-id> <run-id> --candidate <run-id> <run-id>
```

## Details

* `cases create --from-json` ignores `--variables`, `--external-systems`, and `--custom-metric`. Put `variables`, `external_systems`, and `metric_ids` in the file.
* `cases from-conversation` saves nothing. To save the test case, run `cases create`.
* `runs create` reads the daily quota before it starts the runs. If the batch may not fit, adacli prints a warning and starts the runs. `--no-quota-check` skips the read.
* The default daily limit is 3,000 test runs.
* `runs create --block-external-calls` mocks every API tool. It also blocks every request from a code tool, an MCP tool, and an HTTP Request block.
* In `runs list`, `--changesets baseline` keeps only the runs on the live configuration.
* A run on a change set removes the `untested` warning of `changesets promote`.

For every option of a command, run it with `--help`, for example `adacli acme testing cases create --help`.

## Related commands

* [`changesets`](/adacli/commands/changesets): stage the changes that a test run checks.
* [`chat`](/adacli/commands/chat): chat with the AI Agent to check one reply.
* [`custom-metrics`](/adacli/commands/custom-metrics): get the IDs for `--custom-metric`.

---

Have any questions? Contact your Ada team, or email us at [](mailto:help@ada.cx?subject=Help%20Docs%20inquiry).