1250589385/DSH-Test-Autofix ↗★ 0

dsh-test-autofix

自动运行测试并精准定位失败信息供修复 适合需要智能体自动跑测试、定位断言失败并进入修复循环的场景。

套件
dsh-test-autofix
相容性
待驗證
版本
0.1.3
授權
MIT
最近更新
2026年10月20日

安裝

$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 分钟