Repository navigation
Testing
sajidbuet edited this page Sep 24, 2026
·
2 revisions
The authoritative document is
docs/TESTING.md.
pytest # everything, ~30 min on an idle machine
pytest tests/unit # fast, no Qt
pytest -m gui # GUI only
pytest --cov=omr_scannerGUI tests need a Qt platform plugin; the offscreen one is selected
automatically on a headless runner, or force it with
QT_QPA_PLATFORM=offscreen.
tests/
├── unit/ pure logic, imaging geometry, the synthetic generator, layering
├── integration/ services + database + filesystem together
├── gui/ pytest-qt tests of the PySide6 shell
└── fixtures/ test data
- A test asserts behaviour, not implementation. A test that restates the code is worse than no test.
-
A measurement, not "something happened".
assert result is not Noneis not a test of an alignment engine. Compare a recovered position against a known one and report the distance; justify every tolerance where it is defined. - Failures are tested as carefully as successes. For examination software, "refuses a damaged project cleanly" matters as much as "opens a good one".
-
Architecture is tested too.
tests/unit/test_architecture.pyparses every source file and enforces the layering. - Tests never touch real user data. An autouse fixture redirects the per-user configuration and log directories into the test's temporary folder.
Read the GUI testing policy in docs/TESTING.md, and in particular the
three ways an offscreen Qt test hangs or lies: a nested modal loop that
never returns, a signal wired to a modal prompt, and resize() on a widget
that was never shown. Each has cost a real debugging session here.
Packaging and installer verification are separate and live in
scripts/release/ — see Release Process.
0.1.0-alpha.2 · Alpha
Getting Started
User Guide
- Overview
- Projects
- Template Design
- Scanning
- Processing
- Review & Resolution
- Attendance
- Answer Keys & Scoring
- Results & Reports
Examination Sets
Reference
- Project Format
- Attendance Workbook Format
- Answer Key Format
- Result Workbook Format
- Recognition Symbols
Administration
Troubleshooting
Developers
Project