testament is a Rust CLI and library workspace for evaluating test quality
guardrails from static test IR and optional dynamic evidence. The first
supported target is Ruby test suites, with RSpec, Minitest, and test-unit
adapters. Ruby syntax is parsed with Prism through the ruby-prism crate.
- Adequacy signals such as assertion density, line/branch coverage, mutation score, checked coverage from trace evidence, and a separately identified static checked-coverage approximation.
- Redundancy signals from static similarity, assertion overlap, per-test coverage, and per-test mutation evidence.
- Maintainability signals from test-smell rules.
- Rust 1.91, managed by rust-toolchain.toml
- Ruby 3.1 or newer for the Ruby probe syntax/runtime checks
Install the CLI from crates.io:
cargo install testament-cliInstall the optional Ruby probe from RubyGems.org:
gem install testament-probe-rubyTo install the current main branch directly from the repository:
cargo install --git https://github.com/ydah/testament testament-clitestament check
testament report --format json spec/user_spec.rb
testament explain adequacy.assertion_density
testament explain --file spec/user_spec.rb
testament check --no-rename-trackingcargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --locked
ruby -c probes/ruby/testament-probe-ruby/lib/testament/probe.rbRun a fixture report:
cargo run -p testament-cli -- --config fixtures/evidence/testament.toml report --format json fixtures/ruby/sample_spec.rbThe Ruby probe can collect per-test coverage and trace evidence:
require "testament/probe"By default it writes .testament/per-test-coverage.json and
.testament/trace.json. See
Ruby probe README
for probe-specific options.
This project is licensed under the MIT license. See LICENSE.
Maintainer release instructions are documented in RELEASING.md.