Skip to content

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 the prerequisites/cleanup parts of the scenario.
  • Rule 2: Scenario ID = MD filename without .md. It must match in YAML (runner/scenarios/{id}.yaml), report name, and latest-{id} symlink.

Click-test workflow

  1. Create REPORT_DIR=docs/click/reports/{id}-$(date ...) + screenshots/ before start.
  2. Load the scenario (YAML has priority over MD).
  3. Create prerequisites via API, store IDs for cleanup.
  4. Go through UI steps (each step = action + snapshot; checkpoints = screenshots).
  5. Verify expectedResults (URL/text/element/console).
  6. Always cleanup: UI first, then API delete for prerequisite data.
  7. report.json + python3 render-report.pyreport.html.
  8. 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.