con un clic
test-runner
运行测试并分析结果,提供详细的测试报告;触发词:运行测试、测试运行、执行测试、/test-runner
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
运行测试并分析结果,提供详细的测试报告;触发词:运行测试、测试运行、执行测试、/test-runner
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
分析代码变更并生成详细的commit信息,执行git提交;触发词:提交代码、git commit、代码提交、/code-commit
编写和执行SQL查询,分析数据库结果;触发词:数据库查询、SQL查询、执行SQL、/db-query
分析日志文件,检查异常模式、错误级别和关键事件;触发词:分析日志、检查日志、日志异常、/log-analysis
将已知 bug 或功能需求记录为 GitHub Issue;触发词:记录 bug、已知 bug、功能需求、记录需求、/devlog
| name | test-runner |
| description | 运行测试并分析结果,提供详细的测试报告;触发词:运行测试、测试运行、执行测试、/test-runner |
| version | 1.0.0 |
运行项目测试,分析测试结果,提供详细的测试报告和改进建议。
用 AskUserQuestion 询问:
# Node.js项目
ls package.json
cat package.json | grep -E "(jest|vitest|mocha|jasmine)"
# Python项目
ls requirements.txt setup.py pyproject.toml
cat requirements.txt | grep -E "(pytest|unittest|nose)"
# Java项目
ls pom.xml build.gradle
cat pom.xml | grep -E "(junit|testng)"
# 查找测试文件
find . -name "*.test.*" -o -name "*.spec.*" -o -name "*_test.*" -o -name "test_*"
# 查找测试目录
find . -type d -name "test" -o -name "tests" -o -name "__tests__"
# Node.js
npm test
# 或
yarn test
# 或
pnpm test
# Python
pytest
# 或
python -m unittest discover
# Java
mvn test
# 或
gradle test
# Node.js
npm test -- --testPathPattern=<模式>
npm test -- --testNamePattern=<名称>
# Python
pytest <文件路径>::<测试方法>
python -m unittest <测试类>.<测试方法>
# Java
mvn test -Dtest=<测试类>#<测试方法>
# Node.js
npm test -- --coverage
npx jest --coverage
# Python
pytest --cov=<模块>
coverage run -m pytest
coverage report
# Java
mvn test jacoco:report
# 统计测试结果
grep -c "PASS" <测试输出>
grep -c "FAIL" <测试输出>
grep -c "SKIP" <测试输出>
# 计算通过率
echo "scale=2; $PASS * 100 / ($PASS + $FAIL + $SKIP)" | bc
# 提取失败测试
grep -A 10 "FAIL" <测试输出>
# 提取错误信息
grep -B 5 -A 10 "Error\|Exception" <测试输出>
# 提取执行时间
grep -o "Time: [0-9.]*" <测试输出> | tail -5
# 统计总执行时间
grep "Time:" <测试输出> | tail -1
🧪 测试执行报告
================
📊 测试概览
- 测试框架: <框架名称>
- 测试文件: <数量>
- 测试方法: <数量>
- 执行时间: <时间>
📈 测试结果
- 通过: <数量> (<百分比>%)
- 失败: <数量> (<百分比>%)
- 跳过: <数量> (<百分比>%)
- 错误: <数量> (<百分比>%)
✅ 通过的测试
1. <测试1>
2. <测试2>
❌ 失败的测试
1. <测试1>: <失败原因>
2. <测试2>: <失败原因>
⚠️ 跳过的测试
1. <测试1>: <跳过原因>
🔧 改进建议
1. <建议1>
2. <建议2>
3. <建议3>
📁 覆盖率报告
- 行覆盖率: <百分比>%
- 函数覆盖率: <百分比>%
- 分支覆盖率: <百分比>%