E

Easy Testing Executor

Boost productivity using this create, comprehensive, integration, testing. Includes structured workflows, validation checks, and reusable patterns for testing.

CommandClipticstestingv1.0.0MIT
0 views0 copies

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

ConceptDescription
Targeted executionRun specific files, functions, or tagged groups
Retry logicAutomatically re-run failed tests N times before marking as failed
Streaming outputDisplay results as they happen rather than buffering
Flaky detectionFlag 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

OptionDefaultDescription
retry0Number of retries for failed tests
tagnoneFilter tests by tag or group name
timeout30sPer-test timeout in seconds
streamtrueStream output in real-time
bailfalseStop after first failure without retrying

Best Practices

  1. Use targeted runs during development -- running one file is 10x faster than running the full suite.
  2. Set retry to 1 for CI -- one retry catches most flaky tests without hiding real failures.
  3. Tag slow tests -- mark integration and e2e tests so you can skip them during rapid iteration.
  4. Investigate every retry-pass -- a test that needs a retry has a race condition or external dependency worth fixing.
  5. Keep per-test timeout short -- 30 seconds catches hung tests early; raise only for known slow operations.

Common Issues

  1. "Test file not found" -- Double-check the path. The command resolves paths relative to the project root, not the current directory.
  2. 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.
  3. Tag filter matches nothing -- Tag names are framework-specific. Use @tag for Jest, @pytest.mark for Python, //go:build for Go.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates