dsh-test-runner
DSH plugin: structured test runner tool (test_run) — auto-detect vitest/jest/pytest/node:test, run tests, parse failure summaries for the model.
AI Analysis
核心用途是让 AI 代理能够自主运行代码测试并根据报错进行修复。适合在使用 DSH 进行辅助编程、测试驱动开发(TDD)或自动化代码维护任务的开发者。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:suimi8/dsh-test-runnerREADME
Read the full README ↗使用示例
模型侧直接调用:
test_run(自动探测,跑全部)test_run(target="src/utils.test.ts")(跑单文件)test_run(framework="pytest", target="tests/test_api.py::test_login")test_run(last_failed=true)(只重跑上次失败)test_run(command="pnpm vitest run --coverage")
返回结构:
{
"ok": false,
"framework": "node",
"command": "node --test",
"exitCode": 1,
"durationMs": 800,
"summary": { "total": 6, "passed": 5, "failed": 1, "skipped": 0 },
"failures": [
{ "name": "string: broken case (intentional failure)",
"message": "Expected values to be strictly equal: | 'WORLD' !== 'WRLD' | ..." }
],
"outputTail": ""
}
能力分层与配置
| 规范要求 | 状态 | 说明 |
|---|---|---|
| 不过早拆分 Service Definition/Provider/Consumer | ✅ | 单包工具,未拆(practice 明确说 simple tool 不拆) |
| 可调值进 Config Schema | ✅ | 无部署间可调值(框架/命令由模型参数传入) |