suimi8/dsh-test-runner1

dsh-test-runner

DeepSeek Harness 结构化测试运行器工具插件,支持自动探测 vitest/jest/pytest/node:test 并为模型解析失败摘要。

AI 分析

核心用途是让 AI 代理能够自主运行代码测试并根据报错进行修复。适合在使用 DSH 进行辅助编程、测试驱动开发(TDD)或自动化代码维护任务的开发者。

包名
dsh-test-runner
版本
0.1.0
许可证
MIT
最近更新
2026年8月13日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:suimi8/dsh-test-runner

使用示例

模型侧直接调用:

  • 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无部署间可调值(框架/命令由模型参数传入)