Testing¶
Nothing here needs the network, and nothing touches your real library — every suite runs against a temporary one.
The Python suite¶
uv run python -m unittest discover -s tests -p "test_*.py"
File |
Covers |
|---|---|
|
the library, importing, search, collections |
|
every API route the workspace calls |
|
filters, sorting, deletion previews, import batches |
|
storage relocation and restart persistence |
|
the Python rules engine on the five standard perft positions |
|
books, the opening book, position library |
|
Wikipedia matching, including what it refuses to claim |
|
annotation judgments |
|
repertoire import, collection kinds, the lichess account, engine and sensor statistics |
|
ChessBase encodings, tags, filters and sorts |
|
games shelved in several collections, and the routes that manage them |
|
the lichess game watcher: settings, windows, failures and teardown |
|
the explorer: player perspective, filters, trends and weakest-line collapsing |
|
picking and unpacking the right engine build for each platform |
The JavaScript rules engine¶
powershell -File tests\run.ps1
Runs under Windows Script Host — no Node needed. Perft on the standard positions, SAN round-trips, and a legality check of every stored opening, endgame and study.
Browser regressions¶
These drive a real Edge through Playwright:
Playwright arrives with uv sync; the browser itself is the Edge you already have.
uv run python tests\workbench_browser.py
uv run python tests\sounds_browser.py
uv run python tests\autoimport_browser.py
uv run python tests\explorer_browser.py
uv run python tests\deploy_browser.py
uv run python tests\analysis_quality_browser.py
workbench_browser.py checks board rendering against the rules engine, navigation,
shapes, panel layout and persistence, the live engine and its telemetry grid, the
five-colour line palette, tablebase UI, annotation round-trips, import undo, filtered
deletion, and the two smoke pages.
autoimport_browser.py drives the auto-import card with lichess stubbed out: the card
appears only once an account is connected, settings persist without a save button, a
check really imports, a second check imports nothing, the run is undoable, and switching
off — or forgetting the token — stops the watcher.
explorer_browser.py indexes a small collection and drives the explorer: it opens on
the collection tree, the score follows the named player rather than White, clicking a
move walks the tree and the breadcrumb walks back, the filters narrow it, the trend is
per year, and the weakest list names the line that cost the points.
deploy_browser.py starts deploy/serve.py as its own process with the repository
kept off the path, so it fails if the download page ever grows a dependency on the
application. It checks that each platform is offered its own build, that the asset names
match what the release workflow produces, and that the folder stays small.
sounds_browser.py checks the sound catalogue against what is actually on disk, that
every file it claims is served as audio, that every event resolves to a real sample
through the fallback chain, and that the settings card offers the bundled sets without
asking for files.
Smoke pages¶
With py server.py running:
http://localhost:8000/tests/workspace-smoke.html — opens every module, plays a move, walks the context tabs, reports uncaught errors
http://localhost:8000/tests/smoke.html — mounts every training level and pokes it
http://localhost:8000/tests/visual.html — board renderer preview
Headless:
msedge --headless=new --virtual-time-budget=30000 --dump-dom `
http://localhost:8000/tests/workspace-smoke.html
The built executable¶
uv run python tests\check_bundle.py
Starts dist/Caissa/Caissa.exe against a temporary library, checks it comes up with an
empty library, and verifies the bundled assets match the sources byte for byte.