Testdelta

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Oct 25, 2026

Base-vs-head test result differ: named tests added, removed, and changed, never raw counts.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

一個本機 MCP 伺服器,用來比對兩份具名測試結果集,回報哪些測試回歸、修復、新增或移除。

可以做什麼
比對 base 與 head 兩份測試結果集,可來自含 base.json 和 head.json 的目錄,或同時包含兩個物件的單一檔案,回傳 REGRESSED 或 NO-REGRESSION 結論,並列出具名的回歸、修復、新增、移除、持續失敗及其他狀態變更的測試,以及依嚴重程度排序的發現項目。
適用情境
當測試執行器或 CI 工作已為兩個版本寫出 pass/fail/skip 結果,而你需要助理明確指出具體哪些具名測試失敗或被修復,而不是比較原始計數時使用。
執行需求
透過 npx 或 Docker 以 stdio 作為本機程序執行。需要一個包含 base.json 和 head.json 的目錄,或含 base 與 head 物件的單一 JSON 檔案,狀態僅限 pass、fail 或 skip。未宣告帳號、金鑰或網路存取需求。
安裝前請注意
它只讀取結果檔案,不執行測試也不產生狀態,結果須事先產生。測試名稱採精確字串比對,重新命名的測試會顯示為一個移除和一個新增。格式錯誤或未知狀態會報錯。人類可讀報告每類最多列出 50 個名稱。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Testdelta,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

testdelta

Diff two named test result sets and report exactly which tests regressed, which were fixed, which were added, and which were removed. Never raw counts without names: every category in the human report lists the test names in it.

What it does

testdelta compares a base result set against a head result set. Each set maps a test name to one of three statuses: pass, fail, or skip. From the two sets it computes:

  • Regressions: tests that were pass or skip in base and are fail in head.
  • Fixes: tests that were fail in base and are pass in head.
  • Added: tests that exist only in head, with their head status.
  • Removed: tests that exist only in base, with their base status.
  • Still-failing: tests that are fail in both sets.
  • Unchanged: tests present in both sets with the same status, other than fail in both.
  • Other changes: tests present in both sets whose status changed in a way that is neither a regression nor a fix, for example pass to skip.

Name lists are sorted alphabetically within each category, and the output is deterministic: no timestamps and no random ordering.

Findings highlight the categories a human should look at first:

  • One high finding per regression (rule REGRESSION, evidence such as base=pass head=fail).
  • One info finding per fix (rule FIXED).
  • One medium finding per removed test that was passing (rule REMOVED-PASSING).
  • One low finding per added test that is failing (rule ADDED-FAILING).

Input formats

Directory with base.json and head.json

Point testdelta at a directory containing two files:

base.json:

json
{  "test-login": "pass",  "test-checkout": "pass",  "test-search": "fail"}

head.json:

json
{  "test-login": "fail",  "test-checkout": "pass",  "test-search": "pass"}

In this example test-login is a regression and test-search is a fix.

Single file with base and head objects

A single JSON file can carry both sets:

json
{  "base": {    "test-login": "pass",    "test-search": "fail"  },  "head": {    "test-login": "fail",    "test-search": "pass"  }}

Missing files, missing base or head objects, malformed JSON, and status values other than pass, fail, or skip are errors. The CLI reports the error and exits with code 2.

Install

sh
npx @reneturcios/testdelta diff ./results

Or install it globally:

sh
npm install -g @reneturcios/testdelta

CLI usage

sh
# Human readable report (default target is the current directory)testdelta diff [path]
# Machine readable JSON reporttestdelta diff [path] --json
# Run as an MCP server over stdiotestdelta mcp
# Print the versiontestdelta --version

Exit codes:

  • 0: the verdict is NO-REGRESSION.
  • 1: the verdict is REGRESSED.
  • 2: usage error, including missing or invalid input.
  • 141: the reader closed the output pipe early (the shell-visible equivalent of SIGPIPE).

In the human report, each category lists test names, capped at 50 names per category. When a category has more, the list ends with an explicit and N more line instead of truncating silently. The JSON report always carries the full findings list.

MCP tool

The MCP server exposes one tool:

diff_test_results

  • Input: path, the target directory or single result file.
  • Output: the full JSON report, with the verdict, the counts for every category, the findings, and a summary that names the counts and the first regression names.

Verdict rules

  • REGRESSED: at least one regression exists, meaning a test that was pass or skip in base is fail in head.
  • NO-REGRESSION: no regressions. Added failing tests, removed tests, and tests that were already failing in base do not change the verdict on their own; they are reported as findings and counts so a human can decide.

Limits

  • testdelta works on result files. It does not run tests, and it does not produce the pass, fail, or skip values itself; a test runner or CI job has to write the result sets first.
  • Test name matching is exact string equality. A renamed test appears as one removed test and one added test, not as a change.
  • Only the three statuses pass, fail, and skip are understood. Map any other runner outcome onto one of them before diffing.

來源:README.md,提交 f586e50

工具

1

diff_test_results

Diff two test result sets from a directory containing base.json and head.json, each a JSON object mapping test names to pass, fail, or skip. Returns named regressions (pass to fail), fixes (fail to pass), added and removed tests, and a verdict of REGRESSED or NO-REGRESSION.

輸入參數path必填

版本歷史

1
  1. v0.1.0最新Oct 25, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分