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

# Running Tests

> Execute tests and view results

## From Dashboard

**Manual execution:**

1. Go to Tests tab
2. Select test or test suite
3. Click Run
4. Watch live browser preview
5. View results with video replay

**Test states:**

* `draft` → Instructions written, no code yet
* `ready` → Has Playwright code, ready to run
* `archived` → Disabled, won't run in CI

## From CI/CD

Tests run automatically on pull requests when GitHub bot is installed.

**Custom workflows:**

```yaml theme={null}
# .github/workflows/tests.yml
name: Rehearsal Tests
on: [pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run Rehearsal
        env:
          REHEARSAL_API_KEY: ${{ secrets.REHEARSAL_API_KEY }}
        run: npx rehearsal-cli test --suite=critical
```

## Viewing Results

**Dashboard shows:**

* ✅ Pass/fail status per test
* Video replay of browser session
* Console logs and network requests
* Screenshots at each step
* Execution timeline

**PR comments show:**

* Summary stats (3 passed, 1 failed)
* Failed test details
* Link to full results

<Note>
  Tests run in parallel by default. 10 tests = \~2 minutes total.
</Note>

## Test Suites

Group related tests for organized execution:

* **Smoke** → Critical flows, run on every PR
* **Full regression** → All tests, run nightly
* **Feature-specific** → Login tests, checkout tests, etc.

<CardGroup cols={2}>
  <Card title="Creating Tests" icon="wand-magic-sparkles" href="/creating-tests">
    Write effective tests
  </Card>

  <Card title="FAQ" icon="question" href="/faq">
    Common issues and fixes
  </Card>
</CardGroup>
