TensorWasm

Testing Conventions

Testing Conventions

Owner: @craton-co/maintainers.

Test layers

LayerToolLocationWhen run
Unitcargo test --libsrc/**/{tests.rs,mod.rs#[cfg(test)]}every PR
Integrationcargo test --test ...crates/*/tests/*.rsevery PR
Propertyproptestmixed with unit/integrationevery PR
Fuzz (short)cargo fuzzfuzz/fuzz_targets/*.rsnightly cron
Fuzz (long)cargo fuzzsameweekly cron
CUDA conformancecargo test --features cuda -- --ignoredgated testsself-hosted runner
Benchmarkscriterioncrates/*/benches/*.rs, crates/tensor-wasm-bench/benches/*.rsPR-triggered + nightly

#[ignore] policy

  • CUDA-requiring tests: #[ignore = "requires CUDA hardware"].
  • Hardware-runner-only tests: #[ignore = "requires self-hosted runner"].
  • Flaky tests: not allowed — fix or delete; do NOT mark #[ignore].

Coverage target

85% line coverage on stable crates by 1.0 (measured via cargo llvm-cov).

Coverage is measured in CI by the coverage.yml workflow (cargo llvm-cov), which uploads the lcov.info report to Codecov on pushes to main and on pull requests. A direct link to the coverage dashboard is planned and will be added here once the Codecov project page is public.