Preface¶
When doing requirement testing in DeepSeek Harness (DSH), the common bottleneck is usually not “knowing how to click through pages,” but process discipline: you have to hand-build the skeleton in an empty directory; when opening a session in a subdirectory, the framework root AGENTS.md is not loaded; long requirement documents get split (or not split) by the model on its own; cross-document relations and versions are never confirmed; environment details and credentials have to be re-asked every time; and report formatting drifts out of control.
The community plugin dsh-test-framework (maintainer liujianqiao701) is built for test engineers. It uses a cordis plugin to chain “initialize skeleton + in-session gates + guided onboarding” into a workflow that cannot be skipped. The DSH ecosystem is “everything is a plugin”; the directory page is at SkillHub, and the plugin has no official affiliation with DeepSeek / HiFlow.
What is this¶
dsh-test-framework is an npm-published DSH workflow plugin: with one command it generates a “testing framework” directory and spec files in an empty folder, and injects framework state and constraints into every AI session. Together with tools and runtime skills, it enforces completing “requirement document → submodule split confirmation → version and cross-document relations → test environment and credentials registration” before testing begins.
Implementation-wise, it is a cordis plugin, has zero third-party dependencies (only Node built-in modules), and requires no front-end build. It is compatible with DSH (dsh.engines.dsh = "*"), and requires Node ≥ 20. Source code and documentation are in the GitHub repository; license: MIT.
Core capabilities¶
Pain points and corresponding mechanisms¶
| Pain point | Plugin-side handling |
|---|---|
New folders require manually building AGENTS.md, skills, templates, and directories |
test_framework_init generates the skeleton; if it already exists, it skips and does not overwrite |
When opening a session under a <product>\<module>\ subdirectory, the framework root spec is silently not loaded |
Initialization creates a .git marker and injects a live “testing framework status” section |
| Long docx files are split (or not split) by the model arbitrarily | test_framework_doc_probe inspects page count/sections/menus etc. → when the split criteria are met, you must use ask_user_question to let the user confirm |
| Logic lives in another requirement document but is never checked | Gate crossDocChecked: you must ask about it; if the answer is “none,” you must record relatedDocs: [] |
| Requirement paths do not distinguish versions | Gate versionsConfirmed; the workflow forbids using file timestamps to determine version |
| Environment details and credentials are repeated verbally | test_framework_record writes product-level specs (human-readable md + machine-readable json) |
| Plaintext passwords are scattered around | Plaintext is only stored in _框架配置\环境与账密.md; 框架登记.json only records a pointer |
Old reports pile up under the module report\ |
test_framework_report_gc archives reports older than N hours (default 24) to _archive\报告归档\...; default is dryRun: true (preview) |
Multiple versions of experience are mixed into one module SKILL.md |
Module SKILL.md is an index; each version is stored as skill\<版本>\SKILL.md; test_framework_module_add takes version to create it and backfills the index |
| External project rules leak into this framework | lib\isolation.js explains at the start of the session the project root, which AGENTS.md will be loaded, and intercepts external tool working directories inside modules etc. |
Seven tools¶
Call test_framework_status before you start: if ready: false, you should not begin testing directly.
| Tool | Purpose |
|---|---|
test_framework_status |
Framework root, product/module, registration progress, missing items; includes MCP and isolation-related prompts |
test_framework_init |
Initialize the framework in an empty directory; with dryRun: true, only view the plan |
test_framework_module_add |
Add a leaf menu-level module directory and index; optional version creates a versioned skill and backfills AGENTS.md and product-level 模块路由.md |
test_framework_link |
Cross-end relation read-only check (does not modify files); CLI equivalent is node lib\cli.js link |
test_framework_record |
Record product-level specs such as version/split/relations/environment and credentials |
test_framework_doc_probe |
Zero-dependency docx probe: page count, sections, menu hits, split decision, etc. |
test_framework_report_gc |
Call the in-framework archive_reports.py to archive reports; default is preview mode |
Four runtime skills and slash commands¶
Auto-loaded skills include test-framework (overall contract), test-framework-init, test-framework-onboard (guided workflow for requirement testing, module splitting, environment and credentials), and test-framework-module. Runtime skills have rank 250; a framework-local <框架根>\skills\<同名>\SKILL.md (rank 100) overrides the same-named plugin skill.
The plugin also injects “testing framework status” and contract boundaries into the assembled prompt (isolation.js), and provides /tf-status and /tf-gate (check status without consuming a model round-trip).
Prerequisite: Playwright MCP¶
playwright MCP (mcp__playwright__browser_*) is required; there is no alternative path: the framework’s iron rule requires a real browser with real clicks/inputs, and without it the related verifications cannot be performed. At the start of a session, the plugin will show “playwright MCP not detected (required)” in the status section and in test_framework_status.
Configuration is written in the DSH profile’s cordis.patch.yml: add mcp-playwright (serverName: playwright, command @playwright/mcp), and it must be headed (visible window). You must restart DSH after the change (profile-level changes do not support hot loading).
Recommended items: keyword_mcp (complementary evidence gathering), optional cr69_mcp (compatibility for older engines/small viewports).
Self-check:
npx dsh-test-framework doctor
Or inside the framework workspace:
node _plugin\dsh-test-framework\lib\cli.js doctor
Installation and activation¶
The plugin runs with the current dsh process privileges; before installing, review the source code and the MIT license yourself. The following commands come from the repository README.
Install from npm (common)¶
dsh plugin --profile desktop add dsh-test-framework
After installation, restart DSH (the profile’s bundles and cordis.patch.yml do not support hot loading). Verify by checking whether test_framework_status appears in a session, or run:
npx dsh-test-framework doctor --profile desktop
Install from a source link (for plugin development)¶
cd <插件目录>
node lib\cli.js install --profile desktop
node lib\cli.js install --profile desktop --apply
After completion, restart DSH and run node lib\cli.js doctor --profile desktop to self-check (there must be entries in both the dependency and bundles sections; otherwise it is a partial install).
The default install uses a directory junction (link:) to avoid triggering a full node_modules pnpm install on the profile; if you want to use the official command and run pnpm:
node lib\cli.js install --profile desktop --apply --official
Uninstall (does not touch framework workspace files):
node lib\cli.js uninstall --profile desktop
Optional configuration¶
Pin the requirement document root in the profile’s cordis.patch.yml:
- id: test-framework
config:
reqDocRoot: '<你的需求文档总根目录>'
If not configured, it resolves in this order: “plugin config → environment variable DSH_REQ_DOC_ROOT → <用户主目录>\需求业务文档”.
Typical usage: the onboarding guided chain¶
test-framework-onboard corresponds to intents such as “test this requirement document / new-version requirements / whether to split / environment and credentials.” The README’s order is as follows.
test_framework_status: acknowledge the current state and see what’s missing; locate the requirement document path (no guessing allowed).test_framework_doc_probe: page count, sections, menus, strikethrough paragraphs, etc. → split decision; when the criteria are met (e.g., page count > 100, multiple top-level menu names, etc.), stop and useask_user_questionto let the user confirm the split plan.- Cross-document relations: ask which related requirement documents exist locally (if none, you must record
relatedDocs: []). - Version confirmation: clearly determine which version to test this time (using file timestamps to determine version is forbidden).
- Environment and credentials: persist them via product-level registration flows such as
test_framework_record.
When starting from an empty directory, you can first run test_framework_init, then use test_framework_module_add to create modules by leaf menus; before changing cross-end relations, you can use test_framework_link to perform a read-only check.
Use cases and cautions¶
Who it suits: test engineers or small teams who do business requirement testing in DSH, want the AI to follow fixed directories and gates, and need docx probing and report-archiving discipline.
Important cautions:
- Missing playwright MCP is not a degraded mode; it means the iron-rule category-10 verifications cannot be done; run
doctorfirst before you start. - The plugin’s MCP dependency check reads the profile’s
cordis.patch.yml; “not detected” does not necessarily mean it truly does not exist; when it cannot be determined, it will say so explicitly. - Uninstalling the plugin does not delete the framework workspace you have generated; sensitive information should still be placed only in the credential file defined by the framework, and you must follow your local security policy.
Conclusion¶
dsh-test-framework turns “testing framework” from manually building directories into an installable, self-checkable DSH workflow plugin that continuously enforces constraints inside sessions: initialization, module and versioned skills, docx probing, registration and report-archiving tools, plus the onboarding skill—together turning pre-testing requirement checklists into enforceable gates.