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

# Running Tests with TestDriver

> Execute regression test files for debugging and validation.

Run tests using previously created test scripts. This command replays the steps defined in the YAML file, performing each action sequentially.

You can run a test script by specifying the file path in the terminal or interactively within the TestDriver CLI.

### Example in terminal

```bash theme={null}
npx testdriverai@latest run path/to/test.yaml
```

This will execute the test script located at `path/to/test.yaml`. If the test passes, the command will exit with a status code of `0`. If it fails, the command will exit with a status code of `1`.

<Note>
  The path to the test file provided should be relative to the current working
  directory.
</Note>

### Interactive mode

To run a test interactively:

1. Launch the TestDriver CLI:

```bash theme={null}
npx testdriverai@latest edit
```

2. At the `>` prompt, type:

```bash theme={null}
> /run path/to/test.yaml
```

## Notes

* Ensure the YAML file is valid and follows the TestDriver specification.
* The default file path is `testdriver/testdriver.yaml` if no file is specified.

<Card title="Running Tests in CI" icon="link" href="/getting-started/ci">
  Run tests with Hosted Runnings in GitHub Actions
</Card>
