Nothing measures how much of the code the tests run #390

Closed
opened 2026-11-06 17:30:29 -08:00 by rays · 1 comment
Owner

There are 222 Rust tests, 30 page unit tests and 92 browser tests, but no coverage measurement, so what they leave untested is found by reading. Wanted: a coverage run for the Rust crates (cargo-llvm-cov) and for the page (V8 coverage from the browser suite and the unit tests), mapped to the source files, run within the same limits on Tower as builds.

There are 222 Rust tests, 30 page unit tests and 92 browser tests, but no coverage measurement, so what they leave untested is found by reading. Wanted: a coverage run for the Rust crates (cargo-llvm-cov) and for the page (V8 coverage from the browser suite and the unit tests), mapped to the source files, run within the same limits on Tower as builds.
rays added the enhancement label 2026-11-06 17:30:29 -08:00
Author
Owner

Done in b509ea4. Rust: sh scripts/coverage.sh (cargo-llvm-cov in the ipx-coverage image, capped at 6 GB and six threads, one crate at a time) writes target/coverage/summary.txt, lcov.info and html/: 69% of lines from the cargo tests. web.rs (17%) and daemon.rs (10%) are driven by the browser suite against a daemon that is not instrumented, so read low. Page: npm run coverage:page (the browser suite on a build with a source map to each web/src file) writes target/coverage/page: 73% of lines; lowest login.ts (0%: every test signs in by token), native.ts (4%: tested in Node, not measured), signals.ts (27%: its tests need a TypeSafe key) and events.ts (50%). Not measured: the service worker, the page unit tests, native-bridge.

Done in b509ea4. Rust: `sh scripts/coverage.sh` (cargo-llvm-cov in the ipx-coverage image, capped at 6 GB and six threads, one crate at a time) writes target/coverage/summary.txt, lcov.info and html/: 69% of lines from the cargo tests. web.rs (17%) and daemon.rs (10%) are driven by the browser suite against a daemon that is not instrumented, so read low. Page: `npm run coverage:page` (the browser suite on a build with a source map to each web/src file) writes target/coverage/page: 73% of lines; lowest login.ts (0%: every test signs in by token), native.ts (4%: tested in Node, not measured), signals.ts (27%: its tests need a TypeSafe key) and events.ts (50%). Not measured: the service worker, the page unit tests, native-bridge.
rays closed this issue 2026-11-06 17:56:12 -08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#390