Easy Testing Executor
Boost productivity using this create, comprehensive, integration, testing. Includes structured workflows, validation checks, and reusable patterns for testing.
Easy Testing Executor
Execute targeted test suites by file, function, or tag with real-time output streaming and automatic retry for flaky tests.
When to Use This Command
Run this command when...
- You need to run a specific test file or individual test function during development
- You want automatic retry logic to identify and isolate flaky tests
- You are iterating on a failing test and need rapid feedback with streaming output
Avoid this command when...
- You want to run the entire test suite end-to-end without filtering
- You need coverage reports alongside test execution
Quick Start
# .claude/commands/easy-testing-executor.md --- allowed-tools: ["Bash"] --- Run targeted tests with optional retry. Accepts file paths, function names, or tag filters. Streams output in real-time.
Example usage:
/easy-testing-executor src/services/auth.test.ts
/easy-testing-executor --tag integration --retry 2
Example output:
Running: npx jest src/services/auth.test.ts --verbose
PASS loginUser (42ms)
PASS logoutUser (18ms)
FAIL refreshToken (retry 1/2)
PASS refreshToken (retry 2/2, 85ms)
Results: 3 passed (1 retried), 0 failed
Time: 0.92s
Core Concepts
| Concept | Description |
|---|---|
| Targeted execution | Run specific files, functions, or tagged groups |
| Retry logic | Automatically re-run failed tests N times before marking as failed |
| Streaming output | Display results as they happen rather than buffering |
| Flaky detection | Flag tests that pass on retry as potentially flaky |
Input (file/fn/tag) --> Filter Tests --> Execute
|
Pass? +--> Report
|
No
|
Retry? +--> Re-execute
|
No
|
FAIL + flag as flaky
Configuration
| Option | Default | Description |
|---|---|---|
retry | 0 | Number of retries for failed tests |
tag | none | Filter tests by tag or group name |
timeout | 30s | Per-test timeout in seconds |
stream | true | Stream output in real-time |
bail | false | Stop after first failure without retrying |
Best Practices
- Use targeted runs during development -- running one file is 10x faster than running the full suite.
- Set retry to 1 for CI -- one retry catches most flaky tests without hiding real failures.
- Tag slow tests -- mark integration and e2e tests so you can skip them during rapid iteration.
- Investigate every retry-pass -- a test that needs a retry has a race condition or external dependency worth fixing.
- Keep per-test timeout short -- 30 seconds catches hung tests early; raise only for known slow operations.
Common Issues
- "Test file not found" -- Double-check the path. The command resolves paths relative to the project root, not the current directory.
- Retry masking real failures -- If a test consistently fails on first run and passes on retry, it has a timing issue. Reduce retry count and investigate.
- Tag filter matches nothing -- Tag names are framework-specific. Use
@tagfor Jest,@pytest.markfor Python,//go:buildfor Go.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.