Testing¶
Unit / integration tests¶
Run as part of the pipeline (see Sprint Build). Cover logic and API.
UI click tests¶
Repo: /home/david/tmp/click-test, covers UI against a real instance.
Core rules¶
- Rule 1: The tested workflow runs only through the UI (MCP actions
navigate_page,click,fill,wait_for,take_snapshot). API is allowed only in theprerequisites/cleanupparts of the scenario. - Rule 2:
Scenario ID= MD filename without.md. It must match in YAML (runner/scenarios/{id}.yaml), report name, andlatest-{id}symlink.
Click-test workflow¶
- Create
REPORT_DIR=docs/click/reports/{id}-$(date ...)+screenshots/before start. - Load the scenario (YAML has priority over MD).
- Create prerequisites via API, store IDs for cleanup.
- Go through UI steps (each step = action + snapshot; checkpoints = screenshots).
- Verify
expectedResults(URL/text/element/console). - Always cleanup: UI first, then API delete for prerequisite data.
report.json+python3 render-report.py→report.html.- Finalize atomically: symlink
latest-{id}+python3 generate-checklist.py.
Outputs¶
- HTML report
- Screenshots
- Checklist update
- Link the report to the MR/node in openspec
Testing checklist¶
- [ ] Unit/integration covered critical logic
- [ ] Click-test scenarios executed
- [ ] Report and checklist updated
- [ ] Cleanup done (no leftover data)
➡️ Continue to Release.