1 unstable release
| 0.1.0 | Aug 29, 2025 |
|---|
#190 in Testing
30 downloads per month
48KB
1K
SLoC
TDD Guard Rust Reporter
Rust test reporter that captures test results for TDD Guard validation.
Note: This reporter is part of the TDD Guard project, which ensures Claude Code follows Test-Driven Development principles.
Requirements
- Rust 1.70+
- TDD Guard installed globally
cargo-nextest(recommended) orcargo testwith JSON output support
Installation
Step 1: Install TDD Guard
npm install -g tdd-guard
Step 2: Install the Rust reporter
cargo install tdd-guard-rust
Usage
The reporter works as a filter that processes test output while passing it through unchanged.
With cargo-nextest (Recommended)
cargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project
With cargo test
cargo test -- -Z unstable-options --format json 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project
Direct Execution
The reporter can also execute tests directly:
# Auto-detect runner (prefers nextest)
tdd-guard-rust --project-root /absolute/path/to/project
# Force specific runner
tdd-guard-rust --project-root /absolute/path/to/project --runner nextest
tdd-guard-rust --project-root /absolute/path/to/project --runner cargo
Makefile Integration
Add to your Makefile:
.PHONY: test
test:
cargo nextest run 2>&1 | tdd-guard-rust --project-root $(PWD) --passthrough
.PHONY: test-tdd
test-tdd:
tdd-guard on && $(MAKE) test
Configuration
Project Root
The --project-root flag must be an absolute path to your project directory. This is where the .claude/tdd-guard/data/test.json file will be written.
Flags
--passthrough: Force passthrough mode even if stdin is a terminal--runner [auto|nextest|cargo]: Choose test runner for direct execution (default: auto)--project-root: Absolute path to project directory (required)
How It Works
The reporter captures JSON-formatted test output, passes it through unchanged to stdout, and saves TDD Guard-formatted results to .claude/tdd-guard/data/test.json.
License
MIT - See LICENSE file in the repository root.
Dependencies
~3.5–5.5MB
~98K SLoC