| Crates.io | cargo-tes |
| lib.rs | cargo-tes |
| version | 0.1.3 |
| created_at | 2026-01-19 21:31:46.774032+00 |
| updated_at | 2026-01-22 04:16:44.049593+00 |
| description | A cargo subcommand to run cargo test and output filtered test failure messages as a JSON array |
| homepage | |
| repository | https://github.com/permissionlessweb/cargo-chec |
| max_upload_size | |
| id | 2055400 |
| size | 19,486 |

A cargo subcommand that wraps cargo test, filters test failures, and outputs them as a JSON array of strings. Perfect for minimizing character/token count during agentic LLM sessions.
cargo install cargo-tescargo tesOutputs a JSON array like ["Test failed: test_name (exec_time: 0.001s) - failure message", "Suite failed: passed 1, failed 2 (exec_time: 0.005s)"]. All tests pass? [].
cargo install cargo-tes
Requires Rust and Cargo.
cd your-rust-project
cargo tes
# Output: ["Test failed: tests::failing_test (exec_time: 0.000s) - thread 'tests::failing_test' panicked at src/lib.rs:10:9: assertion failed"]
All cargo test flags are supported:
# Test in release mode
cargo tes --release
# Test a specific package
cargo tes -p my-package
# Test all targets
cargo tes --all-targets
# Combine flags
cargo tes --release --all-targets -p my-package
Parse existing cargo test output instead of running cargo test:
# From file
cargo tes --input test_output.json
# From stdin
cargo test --message-format=json -- -Z unstable-options --format=json | cargo tes --input -
JSON array of strings:
[
"Test failed: tests::test_failing (exec_time: 0.000s) - thread 'tests::test_failing' panicked at src/lib.rs:12:9: assertion `left == right` failed left: 4 right: 5",
"Suite failed: passed 5, failed 1 (exec_time: 0.003s)"
]
Empty on no failures: [].
cargo install cargo-tes.============================================
Benchmark: cargo test (JSON) vs cargo tes
============================================
Building cargo-tes...
Build complete.
Running cargo test --message-format=json -- -Z unstable-options --format=json...
Time: 0m0.289s
Output: 161502 characters, 73 lines
Running cargo tes...
Time: 0m0.326s
Output: 10515 characters, 1 lines
============================================
Results Summary
============================================
cargo test --message-format=json -- -Z unstable-options --format=json:
Time: 0m0.289s
Characters: 161502
Lines: 73
cargo tes:
Time: 0m0.326s
Characters: 10515
Lines: 1
Character savings: 93.4%
Open issues/PRs on GitHub. Built for the Rust ecosystem.
Use the provided Justfile for release tasks:
# Run all checks
just check
# Dry-run publish
just dry-run
# Full release
just release
Requires just (install via cargo install just).
This section provides structured details for AI tools to understand and interact with the codebase.
src/main.rs (single-file binary)Cargo.toml (dependencies and metadata)../scripts/ (shared sh scripts for release tasks)../Justfile (shared command runner for release)target/ (generated by Cargo)clap: CLI argument parsing with cargo subcommand supportserde_json: JSON parsing and serializationcargo build --release -p cargo-tes → target/release/cargo-tescargo clippy -p cargo-tescargo fmt -p cargo-tescargo test -p cargo-tescargo publish -p cargo-tesmain() in src/main.rs--input, runs cargo test --message-format=json [args] -- -Z unstable-options --format=json? operator and iterator chains