Introduction

In DSH’s agent workflows, the common action is “modify code → run tests → fix based on failure results.” If the agent runs tests directly with bash, the model reads the entire terminal output. Failed cases and error messages are easily drowned out, increasing reading costs and making it easier to run a round multiple times.

dsh-test-runner addresses this specific problem: it provides a tool named test_run that automatically detects common test frameworks, executes tests, and parses failure summaries for the model to use.

Below is an introduction to the plugin’s features, installation, typical usage, and usage boundaries.

What is it

dsh-test-runner is a DSH plugin with the core tool being test_run. It targets test frameworks such as vitest, jest, pytest, and node:test, completing the structured process of “detect framework → execute tests → parse failure summary.”

The license is MIT. The repository address is:

https://github.com/suimi8/dsh-test-runner

The plugin directory address is:

https://www.skillhub.cn/plugins/suimi8/dsh-test-runner

The README and package.json do not explicitly declare maintainers. This article only lists suimi8 as a repository and directory clue without delving into it as a factual maintainer.

Core Features

The capabilities of test_run revolve around test execution and failure information extraction.

Automatic Framework Detection

The plugin maps frameworks based on project characteristics:

  • When vitest or jest dependencies exist in package.json, it maps to vitest or jest.
  • When package.json has scripts.test, it maps to npm-test.
  • When pyproject.toml, pytest.ini, or conftest.py exist, it maps to pytest.
  • When a test/ directory or *.test.* files exist, it maps to node, corresponding to node:test.

Target Filtering

target is used to specify files, directories, or test case patterns. Multiple targets can be space-separated.

Failure Summary

When tests fail, the plugin extracts failed test case names and error messages, reducing the model’s cost of reading the entire test output.

Re-run Only Failed

last_failed is used to re-run only the previously failed cases. The mapping is:

  • vitest: --lastFailed
  • jest: --onlyFailures
  • pytest: --lf

Custom Command

command can override the default command, suitable for scenarios requiring specific package managers, coverage, or specific parameters.

Timeout and Cancellation

timeout_ms defaults to 120s. Tool cancellation signals are forwarded to the subprocess.

Sandbox Compliance

The plugin parses sandboxPolicy based on the calling session, with priority being “session override > deployment default,” using the same strategy as the bash tool.

Installation and Enablement

First, prepare the plugin directory locally, then execute the local directory installation:

dsh plugin --profile web add ./dsh-test-runner

After installation, restart the dsh web process to enable the plugin:

dsh --profile web

You can view this in the admin panel: Settings → Plugins.

If planning to install from GitHub, the materials note that a prepare script and allowBuilds allowance are required. The GitHub installation command in the verified materials is a placeholder, and the actual remote installation command has not been confirmed; therefore, this article does not provide that command.

Typical Usage

The model side can directly call test_run. The following group of calls covers common scenarios.

Automatically detect framework and run all tests:

test_run

Run a single file only:

test_run(target="src/utils.test.ts")

Specify pytest framework and a single test case:

test_run(framework="pytest", target="tests/test_api.py::test_login")

Re-run only the previously failed cases:

test_run(last_failed=true)

Override default execution command with a custom command:

test_run(command="pnpm vitest run --coverage")

Applicable Scenarios and Notes

This plugin is suitable for agent scenarios in DSH workflows that require frequent Node/JavaScript or Python testing, especially for vitest, jest, pytest, and node:test projects.

It is recommended to note the following limitations before use:

  • Verification date is August 2026. The test environment is Windows + PowerShell executor + node:test.
  • Theoretically feasible in bash environment, but not verified in materials.
  • go test, cargo test, etc., are not covered and will degrade to raw output.
  • The parser matches the default reporter output of current mainstream versions; when output format changes after framework upgrades, it will degrade to exitCode + tail output.
  • timeout_ms defaults to 120s, and tool cancellation signals are forwarded to the subprocess.
  • sandboxPolicy is parsed based on the calling session, using the same strategy as the bash tool.
  • The plugin runs with the permissions of the current dsh process. Before installation, you should check the source code, license, and installation command. The license is MIT.

Conclusion

The value of dsh-test-runner is relatively concentrated: it turns “running tests and reading failure info” from raw terminal output into a structured step that can be completed with a single call to test_run, making it suitable for embedding into DSH’s debugging and repair workflows.

It comes from the community directory and repository of the DSH plugin ecosystem; this directory is an independent site with no official affiliation with DeepSeek / Huanfang.

Plugin Directory:

https://www.skillhub.cn/plugins/suimi8/dsh-test-runner

GitHub:

https://github.com/suimi8/dsh-test-runner