# QtDesktopPet Internal QA This directory contains development-only quality assurance assets. It is tracked by the development repository and excluded from the public GitHub export and release packages. ## Structure - `tests/`: deterministic C++ tests grouped by production module. - `include/`: the lightweight test harness. It does not require `Q_OBJECT`. - `fixtures/`: sanitized, versioned test data. - `config/`: extensible static-check and performance threshold configuration. - `scripts/`: static checks, performance sampling, and report generation. - `out/`: local generated output. This directory is ignored by Git. ## Core Logic Tests The QA project is intentionally independent from the production CMake project. Configure it from this directory when a matching Qt toolchain is available: ```powershell cmake -S internal/qa -B build/internal-qa ` -DCMAKE_PREFIX_PATH=D:/Qt/6.5.3/mingw_64 cmake --build build/internal-qa ctest --test-dir build/internal-qa --output-on-failure ``` The test process enables Qt test mode and uses temporary directories for file fixtures. It must not read or modify the normal QtDesktopPet user configuration. ## Static Checks ```powershell powershell -NoProfile -ExecutionPolicy Bypass ` -File internal/qa/scripts/Invoke-StaticChecks.ps1 ``` The script returns a non-zero exit code when a required invariant fails. Extend `config/static-checks.json` when modules or public-export boundaries change. ## Performance Start QtDesktopPet, then sample a named scenario: ```powershell powershell -NoProfile -ExecutionPolicy Bypass ` -File internal/qa/scripts/perf_sample.ps1 ` -Scenario idle-5m -DurationSeconds 300 ``` Generate a Markdown summary from the resulting CSV: ```powershell powershell -NoProfile -ExecutionPolicy Bypass ` -File internal/qa/scripts/New-PerformanceReport.ps1 ` -InputPath reports/perf/.csv ` -Scenario idle-5m ``` Raw CSV files stay under `reports/perf/` and are not committed. Reviewed, sanitized summaries belong in `docs/test-records/`.