mcpField
L
ln-782-test-runner

ln-782-test-runner

github.com/levnikolaevichTesting & quality584412 installsUpdated 2d ago
Repository

About ln-782-test-runner

A testing skill for projects that detects configured test frameworks, runs their suites, and returns structured results with optional coverage. It is intended for standalone test runs and CI test steps, not building projects or changing tests.

Key features

  1. 01Automatic test framework detection
  2. 02Run detected test suites
  3. 03Parse pass, fail, skip, and duration
  4. 04Optional coverage reports
  5. 05Structured results with failure details
  6. 06Timeout and parallel execution options

Use cases

  1. 01Run tests as a standalone check
  2. 02Add test execution to a CI pipeline
  3. 03Collect coverage during test runs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-782-test-runner

After installing, type/ln-782-test-runnerin Claude Code to confirm it loaded.

Bundled filesreferences/ci_tool_detection.mdreferences/monitor_integration_pattern.md

Details

From the project README

Paths: File paths (references/, ../ln-*) are relative to this skill directory.

MANDATORY READ: Load references/ci_tool_detection.md — test framework registry, compact flags (--tb=short -q, --reporter=json), and normalization chain.

ln-782-test-runner

Type: L3 Worker Category: 7XX Project Bootstrap


Purpose

Detects test frameworks, executes all test suites, and reports results including pass/fail counts and optional coverage.

Scope:

  • Auto-detect test frameworks from project configuration
  • Execute test suites for all detected frameworks
  • Parse test output for pass/fail counts
  • Generate coverage reports when enabled

Out of Scope:

  • Building projects (handled by ln-781)
  • Container operations (handled by ln-783)
  • Writing or fixing tests

When to Use

ScenarioUse This Skill
Standalone-capableYes
Standalone test executionYes
CI/CD pipeline test stepYes
Build verification neededNo, use ln-781

Workflow

Step 1: Detect Test Frameworks

Identify test frameworks from project configuration files.

MarkerTest FrameworkProject Type
vitest.config.*VitestNode.js
jest.config.*JestNode.js
*.test.ts in package.jsonVitest/JestNode.js
xunit / nunit in *.csprojxUnit/NUnit.NET
pytest.ini / conftest.pypytestPython
*_test.go filesgo testGo
tests/ with Cargo.tomlcargo testRust
Step 2: Execute Test Suites

Run tests for each detected framework.

FrameworkExecution Strategy
VitestRun in single-run mode with JSON reporter
JestRun with JSON output
xUnit/NUnitRun with logger for structured output
pytestRun with JSON plugin or verbose output
go testRun with JSON output flag
cargo testRun with standard output parsing
Step 3: Parse Results

Extract test results from framework output.

MetricDescription
totalTotal number of tests discovered
passedTests that completed successfully
failedTests that failed assertions
skippedTests marked as skip/ignore
durationTotal execution time
Step 4: Generate Coverage (Optional)

When coverage enabled, collect coverage metrics.

FrameworkCoverage Tool
Vitest/Jestc8 / istanbul
.NETcoverlet
pytestpytest-cov
Gogo test -cover
Rustcargo-tarpaulin

Coverage Metrics:

MetricDescription
linesCoveredLines executed during tests
linesTotalTotal lines in codebase
percentageCoverage percentage
Step 5: Report Results

Return structured results to orchestrator.

Result Structure:

FieldDescription
suiteNameTest suite identifier
frameworkDetected test framework
statuspassed / failed / error
totalTotal test count
passedPassed test count
failedFailed test count
skippedSkipped test count
durationExecution time in seconds
failuresArray of failure details (test name, message)
coverageCoverage metrics (if enabled)

Error Handling

Error TypeAction
No tests foundReport warning, status = passed (0 tests)
Test timeoutReport timeout, include partial results
Framework errorLog error, report as error status
Missing dependenciesReport missing test dependencies

Options

OptionDefaultDescription
skipTestsfalseSkip execution if no tests found
allowFailuresfalseReport success even if tests fail
coveragefalseGenerate coverage report
timeout300Max execution time in seconds
paralleltrueRun test suites in parallel when possible

Critical Rules

  1. Run all detected test suites - do not skip suites silently
  2. Parse actual results - do not rely only on exit code
  3. Include failure details - provide actionable information for debugging
  4. Respect timeout - prevent hanging on infinite loops
Monitor Integration (Claude Code 2.1.98+)

MANDATORY READ: Load references/monitor_integration_pattern.md

For test suites expected to run >30 seconds, use Monitor to stream failures in real-time:

PatternCommandtimeout_ms
Stream failures{test_command} 2>&1 | grep --line-buffered -E 'FAIL|Error|✗|AssertionError'timeout * 1000 (from Options)
Full output{test_command} 2>&1timeout * 1000

React to first failure immediately while remaining tests continue running.

Fallback: if Monitor is unavailable (Bedrock/Vertex), use Bash(run_in_background=true).


Definition of Done

  • All test frameworks detected
  • All test suites executed
  • Results parsed and structured
  • Coverage collected (if enabled)
  • Results returned to orchestrator

Reference Files

  • Parent: ../ln-780-bootstrap-verifier/SKILL.md

Version: 2.0.0 Last Updated: 2026-01-10

Comments

Markdown supported