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

# Action Rule Conditions and Operators

> Reference for the fields, operators, and limits available when matching Playwright tests in a TestDino action rule.

An action rule matches test cases through conditions. Each condition is a field, an operator, and one or more values. A rule applies to every test case its conditions match.

## Condition fields

There are 13 fields. Which ones a rule can use depends on the action: see [Skip matches before the run](#skip-matches-before-the-run).

| Field                   | What it matches                                    |
| :---------------------- | :------------------------------------------------- |
| **Title**               | The test name on its own                           |
| **Title Path**          | The full suite path plus the test name             |
| **File**                | The spec file the test lives in                    |
| **Test ID**             | Playwright's generated id for the test             |
| **Tags**                | Tags on the test, such as `@smoke`                 |
| **Annotation**          | Playwright annotations on the test                 |
| **Playwright Project**  | The project the test ran under, such as `chromium` |
| **Error Message**       | The error text from a failed test                  |
| **Git Branch**          | The branch the test run came from                  |
| **Commit Author Email** | Email on the commit being tested                   |
| **Commit Author Name**  | Name on the commit being tested                    |
| **Commit Message**      | The commit message being tested                    |
| **Repository**          | The repository the test run came from              |

Error Message only exists after a test has run, so it is available to quarantine and tag rules, never to skip rules.

## Operators

| Operator              | Matches when                             |
| :-------------------- | :--------------------------------------- |
| **is**                | The field matches the value exactly      |
| **is not**            | The field does not match the value       |
| **is one of**         | The field matches any one of the values  |
| **is not one of**     | The field matches none of the values     |
| **includes all of**   | The field has every value you list       |
| **includes any of**   | The field has at least one of the values |
| **is missing all of** | The field has none of the values         |
| **is missing any of** | The field is missing at least one value  |
| **is present**        | The field has any value at all           |
| **is empty**          | The field has no value                   |

**is present** and **is empty** take no values. **is** and **is not** take exactly 1. The rest take a list of up to 50.

A missing field is not the same as an empty one. **is missing all of** is true when the field does not exist at all, because a value cannot be present in something that is not there. **is present** is false in that case.

### Match with a regular expression

Any condition can be evaluated as a regular expression instead of literal text. Patterns are validated when you save the rule, so an invalid pattern is rejected at creation rather than at run time. A pattern that does not compile matches nothing.

## Combine conditions with AND and OR

Conditions live in a tree. The top level is a group set to either **AND**, where every child must match, or **OR**, where at least one must. Groups nest up to 3 levels deep, counting the top level as the first.

A rule targeting flaky checkout tests on 2 branches uses an OR group nested inside an AND group: the test is in `checkout.spec.ts`, and the branch is either `main` or `release`.

## Skip matches before the run

Skip is decided before Playwright starts, so a skip rule can only use information that exists at that point. Conditions that depend on a result cannot back one.

| Field group                                                                     | Allowed in a skip rule                                               |
| :------------------------------------------------------------------------------ | :------------------------------------------------------------------- |
| Git Branch, Commit Author Email, Commit Author Name, Commit Message, Repository | Any operator                                                         |
| Title, Title Path, File, Tags                                                   | Only **is**, **is one of**, **includes all of**, **includes any of** |
| Test ID, Annotation, Playwright Project, Error Message                          | Not available                                                        |

The rule builder blocks an unusable combination as you build it, rather than saving a rule that would never fire. Picking an unavailable field shows:

```
Skip happens before tests run, so it can't use Error Message. Use Quarantine instead.
```

Picking an unsupported operator on an allowed field shows:

```
Skip doesn't support "is not" on Title. Use Quarantine instead.
```

Quarantine and tag rules have neither restriction, because they are applied after the test has produced a result.

## Limits

| Limit                | Value                           |
| :------------------- | :------------------------------ |
| Conditions per rule  | 20                              |
| Group nesting depth  | 3                               |
| Values per condition | 50                              |
| Characters per value | 512                             |
| Actions per rule     | 2, and only quarantine plus tag |
| Tags per tag action  | 10                              |
| Characters per tag   | 100                             |
| Rule name            | 200 characters                  |
| Reason note          | 1000 characters, optional       |
| Expiry               | 365 days from creation          |

## Related

<CardGroup cols={2}>
  <Card title="TestDino Actions" icon="bolt" href="/platform/playwright-test-actions">
    How rules skip, quarantine, and tag tests, and how to create one.
  </Card>

  <Card title="Create an action rule" icon="code" href="/api-reference/endpoints/action-rules/create-action-rule">
    Build the same conditions over the public REST API.
  </Card>
</CardGroup>
