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

# Test Sets

> Manage test set collections with the Coval CLI

`create` and `update` also accept `--input-json` (inline JSON, `@file`, or `-` for stdin); explicit flags override fields from the JSON. See [Input JSON](https://docs.coval.ai/cli/agent-mode.md#input-json).

## List Test Sets

```bash theme={null}
coval test-sets list [OPTIONS]
```

| Option | Type | Default | Description |
| - | - | - | - |
| `--filter` | string | — | Filter expression (e.g., `test_set_type=SCENARIO`) |
| `--page-size` | number | 50 | Results per page (1-100) |
| `--order-by` | string | `-update_time` | Sort field, prefix with `-` for descending |

**Output columns:** ID, NAME, TYPE, CASES, CREATED

```bash theme={null}
coval test-sets list
```

## Get Test Set

```bash theme={null}
coval test-sets get <test_set_id>
```

| Argument | Type | Required | Description |
| - | - | - | - |
| `test_set_id` | string | **Yes** | The test set ID |

```bash theme={null}
coval test-sets get ts_abc123
```

## Create Test Set

```bash theme={null}
coval test-sets create [OPTIONS]
```

| Option | Type | Required | Description |
| - | - | - | - |
| `--name` | string | No | Test set name (1-100 characters); the API requires a name supplied through this flag or JSON `display_name` |
| `--slug` | string | No | URL-friendly identifier (auto-generated if omitted) |
| `--description` | string | No | Description of the test set |
| `--type` | string | No | Test set type: `DEFAULT`, `SCENARIO`, `TRANSCRIPT`, or `WORKFLOW` |
| `--tags` | string | No | Comma-separated tag names; pass an empty value to clear all tags |

```bash theme={null}
# Create a basic test set
coval test-sets create --name "Customer Support Scenarios"

# Create with all options
coval test-sets create \
  --name "Billing Scenarios" \
  --slug "billing-scenarios" \
  --description "Test cases for billing-related inquiries" \
  --type SCENARIO \
  --tags "billing,regression"
```

### Create a set with initial cases

CLI 0.10.0 and later accept `test_cases` through `--input-json` when creating a test set. The API creates the set and its cases atomically and accepts up to 50 initial cases. Each case requires `input_str`; optional fields include `description`, `expected_behaviors`, `expected_output_json`, `input_type`, and `script_turns`.

Omitting `test_cases` or providing `[]` creates an empty set. An explicit `null` is invalid. The CLI preserves nested case data and the API validates the individual cases and size limits. Including initial cases also requires the `test-cases:write` permission.

```bash theme={null}
coval test-sets create --input-json '{"display_name":"Support scenarios","test_cases":[{"input_str":"Ask for a refund","expected_behaviors":["Confirm the order before offering a refund"]}]}'
```

## Update Test Set

```bash theme={null}
coval test-sets update <test_set_id> [OPTIONS]
```

| Argument | Type | Required | Description |
| - | - | - | - |
| `test_set_id` | string | **Yes** | The test set ID to update |

| Option | Type | Description |
| - | - | - |
| `--name` | string | New name (1-100 characters) |
| `--slug` | string | New slug |
| `--description` | string | New description |
| `--tags` | string | Comma-separated tag names; pass an empty value to clear all tags |

```bash theme={null}
coval test-sets update ts_abc123 --name "Updated Name"
```

## Delete Test Set

```bash theme={null}
coval test-sets delete <test_set_id>
```

| Argument | Type | Required | Description |
| - | - | - | - |
| `test_set_id` | string | **Yes** | The test set ID to delete |


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