Kouchou-AI Testing
Overview
Use this skill to run and debug tests across the repo.
Core test commands
- •Run API tests with
make test/apiorrye run pytest tests/inapps/api/. - •Run public viewer tests with
pnpm testinapps/public-viewer/. - •Run admin tests with
pnpm testinapps/admin/. - •Run Playwright E2E tests with
pnpm testintest/e2e/. - •Run Playwright with UI or debug mode using
pnpm run test:uiorpnpm run test:debugintest/e2e/.
Testing strategy
- •Use unit tests for components and utilities.
- •Use integration tests for API endpoints and services.
- •Use E2E tests for full user workflows.
- •Use pipeline tests to validate data processing outputs.
E2E testing rules (Playwright + Next.js)
- •Always call
await page.waitForLoadState("networkidle")afterpage.goto. - •Run verification tests before main E2E runs to confirm dummy server and env are correct.
- •Use production-shaped fixtures and avoid hand-crafted dummy data.
- •Use the dummy server in
utils/dummy-serverbecause Server Components make real HTTP requests.
E2E references
- •Read
test/e2e/CLAUDE.mdfor the full Playwright guide, dummy server patterns, and troubleshooting flow.