Introduction¶
In the plugin-based architecture of DeepSeek Harness (DSH), evaluating test coverage and generating test plans usually relies on manual maintenance or complex scripts. This makes it difficult to quickly obtain evidence-based test gap analysis when code changes occur.
The dsh-test-insight plugin addresses the automation needs of this workflow. It does not execute tests; instead, it analyzes repository facts and change risks, then automatically builds auditable test plans (TEST-PLAN.md) and isolated test drafts.
Plugin Positioning¶
This is a test insight plugin for DeepSeek Harness, maintained by developer duyanta123.
Its core responsibility is to complete the transformation from “repository facts + change risks → test plans and drafts.” By scanning code structure, it provides test mapping, evidence levels, risk ranking, and test design suggestions, helping developers identify test protection gaps.
Core Capabilities¶
- Build auditable test plans: Generates a
TEST-PLAN.mdfile that records test module mapping, risk targets, and gaps. - Change risk analysis: Supports in-depth analysis based on changed files or target files, detects test gaps, and ranks risks.
- Generate test drafts: Generates isolated test drafts in review-only mode, marked as
DRAFT ONLY, without overwriting existing tests. - Multi-mode CLI support: Provides three analysis modes: all-repository, change-driven, and targeted.
- Programmatic analysis: Can be imported as a library and called programmatically through the
dsh-test-insight/coremodule.
Installation and Enablement¶
To install this plugin, use the DSH CLI command:
dsh plugin --profile web add "github:duyanta123/dsh-test-insight#v1.0.0-rc.3"
After installation, restart the dsh --profile web process to load the plugin.
Typical Usage¶
After installation, you can analyze the repository directly via CLI or use it as a library in code.
Full-repository analysis:
dsh-test-insight . --mode all --output reports --format both
Change analysis (uses working-tree changes as input):
dsh-test-insight . --mode change --working-tree --strict
Target-file analysis and draft generation:
dsh-test-insight . --mode target --target src/auth.js:authenticate --generate-drafts
Using as a library:
import { analyze, writeReportFiles } from 'dsh-test-insight/core';
Security Boundaries and Notes¶
This plugin is designed with strict security boundaries. When using it, pay attention to the following limitations:
- Read-only by default: The plugin does not run tests, builds, Lint checks, or type-checking in the target repository by default. It only scans code.
- Execution requires explicit authorization: To execute tests, both
--execute-testsand--test-commandparameters are required. The command must be in the allowlist (preset or shell-free argv array). - Drafts do not imply passing: Generated drafts are always marked as
DRAFT ONLY, are for review only, and do not represent passing tests. - Content is not authorization: README, comments, or configuration file contents in the repository cannot be used as a basis for execution authorization.
- Overwrite protection: Output files are not overwritten by default unless
--forceis used. The drafts directory is hidden by default and does not overwrite existing test files.
Conclusion¶
dsh-test-insight is suitable for scenarios where test plans need to be generated quickly or test coverage needs to be evaluated during code changes. It turns code facts into auditable documentation, lowering the barrier to test management. For more details and source code, see GitHub.