# Testing Strategy - ShowRunner

ShowRunner uses a multi-layered testing strategy across Rust, Python, and TypeScript.

## 1. Automated CI (GitHub Actions)

The CI pipeline runs on every push and PR:
- **Frontend**: Vitest (Unit/Component), Lint, Format.
- **Python Backend**: Pytest, Ruff (Lint/Format).
- **Rust Backend**: Cargo Test, Cargo Clippy, Cargo Fmt.

## 2. Test Fixtures

Standardized session fixtures are located in `tests/fixtures/`.
- `session_v1/`: Represents a complete MVP session with metadata, steps, and events.

Use these fixtures to test migration logic, editor rendering, and export generation.

## 3. Manual QA

For features that are hard to automate (video recording, global hotkeys, overlay UI), follow the [QA_CHECKLIST.md](QA_CHECKLIST.md).

### Key Manual Scenarios:
- **Hotkeys**: Verify `Cmd+Shift+R` (Toggle Recording) and `Cmd+Shift+M` (Mark Step) work globally.
- **Overlay**: Verify the transparent window correctly captures clicks and shows feedback.
- **Video Export**: Manually inspect produced MP4s for visual artifacts or chapter cards.

## 4. Component Testing (React)

We use **Vitest** + **React Testing Library**.
- Prefer testing components in isolation.
- Mock Tauri API calls using `@tauri-apps/api/mocks` if needed.

## 5. Integration Testing

Located in `tests/integration/` (Python/Playwright).
- Tests the interaction between the Python sidecar and recorded artifacts.
