This page is a short map of the repository's test surfaces. It is meant to
complement, not replace, the detailed case catalog in TESTS.md.
- Catch2/CTest unit and integration tests: the normal automated test suite.
TESTS.md: detailed case-by-case intent, setup, procedure, and expected outcomes.- Production self-test mode:
--self-testand--self-test=whitelistprovide deterministic checks from the built app. - Opt-in live headless LLM tests:
tests/live_llm/headless_live_llm_tests.pyruns the production headless path with a real local model and real/generated fixtures.
Build and run the normal test suite:
cmake --build build-tests --config Release --target ai_file_sorter_tests --parallel
ctest --test-dir build-tests -C Release --output-on-failure
Run a single Catch2 case:
./build-tests/ai_file_sorter_tests "<test case name or pattern>"
On Windows multi-config builds, the direct executable lives under
./build-tests/tests/<Config>/, for example:
./build-tests/tests/Release/ai_file_sorter_tests.exe "<test case name or pattern>"
Windows test targets copy the matching vcpkg runtime DLLs beside each test
executable after the target builds. If a direct ctest run fails because a DLL
is missing or stale, rebuild the relevant test target before rerunning ctest.
- Prompt or taxonomy changes: run the prompt-builder and categorization-focused tests first.
- Headless or Explorer-adjacent changes: run focused
Headless*tests and keepTESTS.mdin sync. - Updater/feed changes: run the updater and update-feed tests.
- Packaging/build-script changes: validate the relevant platform build path in addition to unit tests.
The opt-in live suite is useful when you want to validate the real runtime, selected local model, emitted status JSON, and actual filesystem effects. It is not part of the normal fast unit-test loop.
See these references for the full details:
TESTS.mdtests/live_llm/README.md