1250589385/DSH-Test-Autofix ↗★ 0

dsh-test-autofix

DSH 测试修复循环插件:自动识别项目测试框架,运行测试并结构化解析失败信息,把「哪个文件、哪一行、什么断言失败」精准注入对话,让 agent 直接进入修复循环;同一处失败超过阈值自动停止,避免死循环烧钱。支持中文断言(自动处理 Windows 编码)与参数化测试。 适合需要智能体自动跑测试、定位断言失败并进入修复循环的场景。

Package
dsh-test-autofix
Compatibility
Unverified
Version
0.1.3
License
MIT
Last updated
Oct 20, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1250589385/DSH-Test-Autofix

使用

模型可以直接调用:

run_tests()                          # 自动识别并跑全部测试
run_tests(framework="pytest")        # 强制用 pytest
run_tests(path_filter="test_math")   # 只跑匹配的测试
run_tests(timeout_ms=60000)          # 60 秒超时

也可以直接对模型说:「跑一下测试,把失败的修好」——它就会用这个工具。


配置

在 profile 的 cordis.patch.yml 里覆盖:

- id: test-autofix
  name: DSH-Test-Autofix
  config:
    repeatLimit: 2      # 同一失败重复几次算循环(默认 2)
    timeoutMs: 300000   # 默认超时 5 分钟