ln-782-test-runner
Executes all test suites and reports results with coverage. Use when verifying that test infrastructure works after bootstrap.
What this skill does
> **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
| Scenario | Use This Skill |
|----------|---------------|
| Standalone-capable | Yes |
| Standalone test execution | Yes |
| CI/CD pipeline test step | Yes |
| Build verification needed | No, use ln-781 |
---
## Workflow
### Step 1: Detect Test Frameworks
Identify test frameworks from project configuration files.
| Marker | Test Framework | Project Type |
|--------|---------------|--------------|
| vitest.config.* | Vitest | Node.js |
| jest.config.* | Jest | Node.js |
| *.test.ts in package.json | Vitest/Jest | Node.js |
| xunit / nunit in *.csproj | xUnit/NUnit | .NET |
| pytest.ini / conftest.py | pytest | Python |
| *_test.go files | go test | Go |
| tests/ with Cargo.toml | cargo test | Rust |
### Step 2: Execute Test Suites
Run tests for each detected framework.
| Framework | Execution Strategy |
|-----------|-------------------|
| Vitest | Run in single-run mode with JSON reporter |
| Jest | Run with JSON output |
| xUnit/NUnit | Run with logger for structured output |
| pytest | Run with JSON plugin or verbose output |
| go test | Run with JSON output flag |
| cargo test | Run with standard output parsing |
### Step 3: Parse Results
Extract test results from framework output.
| Metric | Description |
|--------|-------------|
| total | Total number of tests discovered |
| passed | Tests that completed successfully |
| failed | Tests that failed assertions |
| skipped | Tests marked as skip/ignore |
| duration | Total execution time |
### Step 4: Generate Coverage (Optional)
When coverage enabled, collect coverage metrics.
| Framework | Coverage Tool |
|-----------|--------------|
| Vitest/Jest | c8 / istanbul |
| .NET | coverlet |
| pytest | pytest-cov |
| Go | go test -cover |
| Rust | cargo-tarpaulin |
**Coverage Metrics:**
| Metric | Description |
|--------|-------------|
| linesCovered | Lines executed during tests |
| linesTotal | Total lines in codebase |
| percentage | Coverage percentage |
### Step 5: Report Results
Return structured results to orchestrator.
**Result Structure:**
| Field | Description |
|-------|-------------|
| suiteName | Test suite identifier |
| framework | Detected test framework |
| status | passed / failed / error |
| total | Total test count |
| passed | Passed test count |
| failed | Failed test count |
| skipped | Skipped test count |
| duration | Execution time in seconds |
| failures | Array of failure details (test name, message) |
| coverage | Coverage metrics (if enabled) |
---
## Error Handling
| Error Type | Action |
|------------|--------|
| No tests found | Report warning, status = passed (0 tests) |
| Test timeout | Report timeout, include partial results |
| Framework error | Log error, report as error status |
| Missing dependencies | Report missing test dependencies |
---
## Options
| Option | Default | Description |
|--------|---------|-------------|
| skipTests | false | Skip execution if no tests found |
| allowFailures | false | Report success even if tests fail |
| coverage | false | Generate coverage report |
| timeout | 300 | Max execution time in seconds |
| parallel | true | Run 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:
| Pattern | Command | timeout_ms |
|---------|---------|------------|
| Stream failures | `{test_command} 2>&1 \| grep --line-buffered -E 'FAIL\|Error\|✗\|AssertionError'` | `timeout * 1000` (from Options) |
| Full output | `{test_command} 2>&1` | `timeout * 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
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.