PlotDirector/Docs/Codex/Testing.md

53 lines
1.6 KiB
Markdown

# PlotDirector Specialist Testing
Read this document when the change requires specialist testing beyond the normal build and regression harness.
## Normal Gates
From the repository root:
dotnet build PlotLine.slnx
dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj
`PlotLine.Tests` is an executable regression harness. `dotnet test` is not the normal test gate.
Build and regression execution should be serial. Parallel execution can cause static web asset cache locking.
## Browser Tests
Browser tests are under `PlotLine.Tests/Browser`.
When relevant:
npm ci
npx playwright install chromium
npm test
npm run test:locations
npm run test:characters
`CHROMIUM_PATH` can select an existing Chromium installation.
These tests use isolated fixtures rather than the live application/database.
Run only suites relevant to the changed behaviour unless a full browser regression has specifically been requested.
## Database Regression Tests
Database regression scripts are under `PlotLine.Tests/Sql/`.
These are separate from the normal application regression harness. Read the individual script before execution for migration, fixture and rollback prerequisites.
Never run development regression scripts against production.
## Word Companion
For changes affecting `PlotDirector.WordCompanion`, use its npm workflow:
npm install
npm run build
npm run validate
This generates and validates the manifest for the application-hosted `/word-companion` route.
Do not run Word Companion validation for unrelated application changes merely for completeness.