A fast, high-performance exam scheduling system backed by Z3, with a SvelteKit frontend. Designed for small-medium sized schools. kemisolve.wobbl.in
schools school z3 scheduling exam-scheduling solver
kemisolve docs coverage.md
2.7 kB
Markdown
at main

AI Generated

Coverage Guide #

This repository uses Rust LLVM coverage via cargo-llvm-cov, integrated with cargo-nextest.

1) Install coverage tooling #

cargo install cargo-llvm-cov
cargo install cargo-nextest

2) Run coverage from repo root #

Convenient aliases are configured in .cargo/config.toml.

Summary in terminal (via nextest) #

cargo cov

Equivalent command:

cargo llvm-cov nextest --workspace --all-features --summary-only

HTML report (best for browsing/debugging) #

cargo cov-html

Equivalent command:

cargo llvm-cov nextest --workspace --all-features --html --output-dir coverage/html

Then open:

  • coverage/html/index.html

LCOV report (widely supported) #

cargo cov-lcov

Equivalent command:

cargo llvm-cov nextest --workspace --all-features --lcov --output-path coverage/lcov.info

Output:

  • coverage/lcov.info

Cobertura XML (editor/CI friendly) #

cargo cov-cobertura

Equivalent command:

cargo llvm-cov nextest --workspace --all-features --cobertura --output-path coverage/cobertura.xml

Output:

  • coverage/cobertura.xml

3) Editor integration #

VS Code #

Use an extension that reads LCOV (for example, Coverage Gutters) and point it to:

  • coverage/lcov.info

This enables inline file-level highlights based on coverage data.

Zed #

Use coverage consumers/integrations that accept standard report formats.
This repo emits both:

  • coverage/lcov.info
  • coverage/cobertura.xml

These are the most compatible formats for inline or side-panel coverage workflows.


4) Per-crate coverage (optional) #

If you only want solver coverage (still through nextest):

cargo llvm-cov nextest -p solver --all-features --html --output-dir coverage/html-solver

Open:

  • coverage/html-solver/index.html

5) Nix usage #

Coverage is available in the flake flow as checks/packages/apps.

  • Include coverage in check flow:

    • nix flake check
  • Build machine-readable reports:

    • nix build .#coverage
  • Build browsable HTML report:

    • nix build .#coverage-html

6) Notes #

  • Generated coverage artifacts are ignored by git (coverage/, *.profraw, *.profdata).
  • Run coverage from the repository root so workspace paths resolve correctly.
  • The coverage commands above execute tests through nextest, so behavior matches your nextest test workflow.