tpt-testkit

Rust

Unified golden-file, benchmarking, fuzzing, and property-testing infrastructure for the TPT Rust ecosystem.

0 stars0 forks0 watchers

Languages

Rust99.6%Shell0.4%
README

tpt-testkit

Unified testing, benchmarking and fuzzing infrastructure for the TPT ecosystem.

Dev-dependency only. tpt-testkit must never appear in a production dependency graph. CI enforces this with scripts/check-prod-footprint.sh.

Crates

CratePurpose
tpt-testkitLibrary: golden files, bench, fuzz, suite and property APIs (feature-gated).
tpt-testkit-macrosProc macros, e.g. per-file test generation for compatibility suites.
tpt-testkit-cliCommand-line tool: bench-compare, crash deduplication, corpus tools.

Using it in a crate

Add it under [dev-dependencies] only:

[dev-dependencies]
tpt-testkit = { git = "https://github.com/tpt-solutions/tpt-testkit", tag = "v0.1.0" }

Feature flags on tpt-testkit: golden (default), bench, fuzz, suite, property, nostd, platform-isolation.

Development

The toolchain is pinned in rust-toolchain.toml (Rust 1.97.0).

cargo check --workspace
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-features
bash scripts/check-prod-footprint.sh
cargo deny check

Conventions

  • unsafe is forbidden everywhere except the isolated platform-isolation feature.
  • Golden fixtures live in tests/fixtures/ in the calling crate (see docs/golden.md). Regenerate them with TPT_UPDATE_GOLDEN=1.
  • Benchmarks follow the area/format/size naming scheme and are compared against the PR base commit (see docs/bench.md).
  • All test and benchmark output must be machine-readable (JSON/CSV) for CI.

License

Licensed under either of MIT or Apache-2.0, at your option.