Overview
Executes test commands and filters output to show only failures and summary. Supports all major test frameworks with intelligent parsing.Syntax
Arguments
string[]
required
Full test command to execute (e.g.,
cargo test, pytest, npm test)Supported Test Frameworks
Rust - Cargo Test
- Test result summary
- Failed test names
- Failure details
Python - Pytest
- Passed/failed/error counts
- Failed test names
- Assertion failures
JavaScript - Jest/Vitest
- Test Suites summary
- Tests summary
- Failed test names (marked with
✕)
Go - Go Test
- PASS/FAIL lines
- Failed test output
- Coverage summary
Output Format
With Failures
All Passing
With Errors
Token Savings
90% reduction - only failures and summary shownBehavior Details
Failure Detection
RTK detects failures via multiple patterns:- Lines containing
FAILED,ERROR,FAIL - Lines containing
✕,✗,❌ - Assertion failures and panic messages
- Test framework-specific markers
Summary Extraction
Extracts key summary lines:test result:(Rust)Tests:,Test Suites:(Jest/Vitest)passed,failed,errorcounts (Pytest)ok,FAILlines (Go)
Fallback Behavior
If no framework-specific patterns match:- Shows last 5 lines of output
- Preserves exit code
- Still provides token reduction
Tee Output Recovery
On failure (exit code ≠ 0), RTK automatically saves full output and prints a hint:Exit Codes
Preserves the original test command exit code:0- All tests passed1- Some tests failed101- Compilation error (Rust)- Other codes preserved as-is
Related Commands
rtk cargo test- Rust-specific test filter (90% savings)rtk vitest run- Vitest-specific filter (99.5% savings)rtk playwright test- Playwright-specific filter (94% savings)rtk pytest- Pytest-specific filter (90% savings)rtk err- Show only errors from any command
