ln-782-test-runner by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-782-test-runner路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录下未找到,请定位此 SKILL.md 文件所在的目录,然后向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
类型: L3 工作者 类别: 7XX 项目引导 父级: ln-780-引导验证器
检测测试框架,执行所有测试套件,并报告结果,包括通过/失败计数和可选的覆盖率。
范围:
超出范围:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 场景 | 使用此技能 |
|---|---|
| 由 ln-780 编排器调用 | 是 |
| 独立的测试执行 | 是 |
| CI/CD 流水线测试步骤 | 是 |
| 需要构建验证 | 否,请使用 ln-781 |
从项目配置文件中识别测试框架。
| 标记 | 测试框架 | 项目类型 |
|---|---|---|
| vitest.config.* | Vitest | Node.js |
| jest.config.* | Jest | Node.js |
| package.json 中的 *.test.ts | Vitest/Jest | Node.js |
| *.csproj 中的 xunit / nunit | xUnit/NUnit | .NET |
| pytest.ini / conftest.py | pytest | Python |
| *_test.go 文件 | go test | Go |
| 包含 Cargo.toml 的 tests/ 目录 | cargo test | Rust |
为每个检测到的框架运行测试。
| 框架 | 执行策略 |
|---|---|
| Vitest | 在单次运行模式下运行,使用 JSON 报告器 |
| Jest | 使用 JSON 输出运行 |
| xUnit/NUnit | 使用记录器运行以获取结构化输出 |
| pytest | 使用 JSON 插件或详细输出运行 |
| go test | 使用 JSON 输出标志运行 |
| cargo test | 运行并解析标准输出 |
从框架输出中提取测试结果。
| 指标 | 描述 |
|---|---|
| total | 发现的测试总数 |
| passed | 成功完成的测试 |
| failed | 断言失败的测试 |
| skipped | 标记为跳过/忽略的测试 |
| duration | 总执行时间 |
启用覆盖率时,收集覆盖率指标。
| 框架 | 覆盖率工具 |
|---|---|
| Vitest/Jest | c8 / istanbul |
| .NET | coverlet |
| pytest | pytest-cov |
| Go | go test -cover |
| Rust | cargo-tarpaulin |
覆盖率指标:
| 指标 | 描述 |
|---|---|
| linesCovered | 测试期间执行的行数 |
| linesTotal | 代码库中的总行数 |
| percentage | 覆盖率百分比 |
将结构化结果返回给编排器。
结果结构:
| 字段 | 描述 |
|---|---|
| suiteName | 测试套件标识符 |
| framework | 检测到的测试框架 |
| status | passed / failed / error |
| total | 测试总数 |
| passed | 通过的测试数 |
| failed | 失败的测试数 |
| skipped | 跳过的测试数 |
| duration | 执行时间(秒) |
| failures | 失败详情数组(测试名称、消息) |
| coverage | 覆盖率指标(如果启用) |
| 错误类型 | 操作 |
|---|---|
| 未找到测试 | 报告警告,状态 = passed (0 个测试) |
| 测试超时 | 报告超时,包含部分结果 |
| 框架错误 | 记录错误,报告为 error 状态 |
| 缺少依赖项 | 报告缺少测试依赖项 |
| 选项 | 默认值 | 描述 |
|---|---|---|
| skipTests | false | 如果未找到测试则跳过执行 |
| allowFailures | false | 即使测试失败也报告成功 |
| coverage | false | 生成覆盖率报告 |
| timeout | 300 | 最大执行时间(秒) |
| parallel | true | 尽可能并行运行测试套件 |
../ln-780-bootstrap-verifier/SKILL.md版本: 2.0.0 最后更新: 2026-01-10
每周安装量
170
仓库
GitHub 星标数
245
首次出现
2026年1月24日
安全审计
安装于
opencode154
gemini-cli153
cursor153
codex152
claude-code149
github-copilot146
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-780-bootstrap-verifier
Detects test frameworks, executes all test suites, and reports results including pass/fail counts and optional coverage.
Scope:
Out of Scope:
| Scenario | Use This Skill |
|---|---|
| Called by ln-780 orchestrator | Yes |
| Standalone test execution | Yes |
| CI/CD pipeline test step | Yes |
| Build verification needed | No, use ln-781 |
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 |
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 |
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 |
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 |
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 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 |
| 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 |
../ln-780-bootstrap-verifier/SKILL.mdVersion: 2.0.0 Last Updated: 2026-01-10
Weekly Installs
170
Repository
GitHub Stars
245
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode154
gemini-cli153
cursor153
codex152
claude-code149
github-copilot146