Introduction

In the DSH plugin system, parsing test results depends on the specific Runner. Tools such as pytest, Vitest, Jest, and Cargo output summary formats that vary, and processing these heterogeneous data directly increases the complexity of upper-level logic. The dsh-test-normalizer plugin aims to normalize the test results of the aforementioned frameworks into a stable structure for subsequent orchestration and analysis.

Plugin Positioning

This is a structured test result normalization plugin for DSH. It is responsible for parsing test summaries from pytest, Vitest, Jest, and Cargo into a unified internal format. The plugin is an open-source project under the MIT license and is maintained by user MkaliezZ.

Core Features

  1. Multi-Framework Parsing: Supports parsing test summaries from pytest, Vitest, Jest, and Cargo and converting them into a stable output shape.
  2. Runner Adaptation: The DSH adapter (Adapter) accepts a Runner provided by the host. The plugin itself does not bypass DSH execution policies with its own logic.

Installation and Enabling

The plugin is published as an npm package with the package name @mkaliezz/dsh-test-runner. After installation, you need to specify its bundle patch file in the DSH configuration to complete integration.

In package.json, the plugin entry file is defined as lib/src/plugin.js, with the type ES Module. The DSH configuration must include a bundle patch directive pointing to the cordis.patch.yml file:

"dsh": {
    "bundle": {
        "patch": "./cordis.patch.yml"
    }
}

Typical Usage

The current documentation does not provide a specific command-line invocation example. According to the feature description, the plugin, as part of the DSH ecosystem, runs through the Runner provided by the host and converts test summaries from different frameworks into a unified structure. In actual use, refer to the DSH runner configuration and the host Runner integration method.

Applicable Scenarios and Notes

  1. Environment Requirement: The plugin depends on a Node.js environment and requires version 20 or higher.
  2. Permissions and Policy: The plugin is integrated through DSH’s bundle patch mechanism. It does not perform actions that bypass DSH execution policies and relies on the host Runner configuration.
  3. Code Review: Before use, review the source code and license (MIT) to ensure that they meet the project’s security requirements.

Summary

dsh-test-normalizer resolves the issue of inconsistent outputs from multiple test frameworks in the DSH environment. By introducing @mkaliezz/dsh-test-runner and configuring cordis.patch.yml, it can normalize the results from pytest, Vitest, Jest, and Cargo. This is a lightweight plugin suitable for scenarios that require integrating multiple testing tools into a single Harness flow.