Daily Test Coverage ImproverResearch and Plan #1141
Replies: 6 comments
-
|
Phase 2 complete. Targeted the 5 zero-coverage files from the plan and added 28 new tests across Coverage improvement: Statements 77.81% → 84.86% (+7.05pp), Branches 66.76% → 71.38% (+4.62pp), Functions 71.20% → 78.80% (+7.60pp), Lines 79.84% → 86.62% (+6.78pp). All 180 tests pass. Draft PR created with full details. Next run will target remaining zero-coverage files (
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 run complete. Worked on zero-coverage and low-coverage hooks: Overall coverage improved: Statements 84.86% → 89.28% (+4.42pp), Functions 78.80% → 84.80% (+6.00pp), Lines 86.62% → 90.91% (+4.29pp). Draft PR created with all 194 tests passing.
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 run complete. Targeted Overall coverage improved: Statements 89.07% → 92.90% (+3.83pp), Branches 72.88% → 76.83% (+3.95pp), Functions 84.80% → 88.00% (+3.20pp), Lines 90.59% → 94.55% (+3.96pp). All 206 tests pass. Draft PR created with full details.
|
Beta Was this translation helpful? Give feedback.
-
|
Run complete. Worked on
|
Beta Was this translation helpful? Give feedback.
-
|
Added |
Beta Was this translation helpful? Give feedback.
-
|
This discussion was automatically closed because it expired on 2026-02-28T05:45:04.938Z.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Repository Summary
HardwareVisualizer is a cross-platform hardware monitoring app built with Tauri (Rust + React/TypeScript). It has two test suites: a frontend suite (Vitest) and a backend suite (Rust
cargo test).Current Test Coverage
Frontend (Vitest + v8 coverage)
Tests run with
npm test(=vitest run --coverage). As of initial analysis (2026-02-21):35 test files, 152 tests — all passing.
Coverage thresholds set at 60% for all metrics (passing).
Backend (Rust)
src-tauri/src/_tests/:background_image_test.rs,settings_test.rs,commands/cargo tauri-testcargo-llvm-covorgrcov)Files with Zero Coverage (Frontend)
These are the highest-priority targets for new tests:
hooks/useWindowSize.tshooks/useTitleIconVisualSelector.tsfeatures/menu/hooks/useMenu.tsfeatures/hardware/dashboard/hooks/useSortableDashboard.tsfeatures/hardware/hooks/useGpuNames.tsfeatures/hardware/insights/process/funcs/getProcessStatsRecord.tsfeatures/hardware/insights/snapshot/funcs/getArchivedRecord.tsfeatures/hardware/insights/process/hooks/useProcessStatsAtom.tsFiles with Low Coverage (Frontend)
features/hardware/dashboard/hooks/useExportToClipboard.tsfeatures/settings/hooks/useSettingsAtom.tsfeatures/hardware/hooks/useHardwareInfoAtom.tshooks/useFullScreenMode.tsfeatures/hardware/insights/snapshot/hooks/useSnapshot.tsTest Commands
For local development:
Test Organization
src/**/*.test.ts(x)src-tauri/src/_tests/directory@testing-library/react+@testing-library/jest-domvi.mock()for Tauri APIs; Jotai atoms tested viarenderHooksrc/setupVitest.ts(extends jest-dom matchers)Improvement Plan
Priority 1 — Zero-coverage, high-value targets
hooks/useTitleIconVisualSelector.ts— Simple Jotai atom; easiest winhooks/useProcessStatsAtom.ts— Simple Jotai atom; trivial to testhooks/useWindowSize.ts— Window resize hook; mockglobalThis.innerWidthand resize eventsfeatures/hardware/insights/snapshot/funcs/getArchivedRecord.ts— Pure async functions; mocksqlitePromisefeatures/hardware/insights/process/funcs/getProcessStatsRecord.ts— Pure async function; mocksqlitePromisePriority 2 — Zero-coverage, more complex
features/menu/hooks/useMenu.ts— MockuseTauriStore, test open/close and navigationfeatures/hardware/hooks/useGpuNames.ts— Mock SQLite, test GPU name list loadingfeatures/hardware/dashboard/hooks/useSortableDashboard.ts— Mock DnD events + Tauri StorePriority 3 — Improve existing low coverage
features/hardware/dashboard/hooks/useExportToClipboard.ts— Add branch coverage (25% → higher)features/settings/hooks/useSettingsAtom.ts— Cover remaining 3 uncovered functionshooks/useFullScreenMode.ts— Cover the uncovered function pathRust backend
background_imageandsettingscommandscargo-llvm-covto measure and improve Rust coverageOpportunities for Large Coverage Gains
getArchivedRecord.tsfile contains 3 separate exported functions (all 0% covered) — a single test file could cover all of themuseTitleIconVisualSelectoranduseProcessStatsAtomare simple atom wrappers — very quick winsuseWindowSizecovers important UI breakpoint logic used throughout the app — good ROIcargo-llvm-cov) could reveal untested backend pathsHow to Control this Workflow
Add comments to this discussion to provide feedback or adjust the plan.
Available commands:
gh aw disable daily-test-improver --repo shm11C3/HardwareVisualizer gh aw enable daily-test-improver --repo shm11C3/HardwareVisualizer gh aw run daily-test-improver --repo shm11C3/HardwareVisualizer --repeat (number-of-repeats) gh aw logs daily-test-improver --repo shm11C3/HardwareVisualizerWhat Happens Next
On the next run, this workflow will enter Phase 2: it will select a goal from the plan above, implement new tests to improve coverage, verify they pass and improve coverage metrics, and open a draft pull request with the changes. It will then comment here with results.
Each subsequent run will pick the next area of low coverage and iterate, gradually improving the overall test coverage of the repository.
Beta Was this translation helpful? Give feedback.
All reactions