Test Intel

io.github.barissozudogru由 GitHub 账号 barissozudogru 发布v0.8.1更新于 Oct 24, 2026

Coverage analysis, untested function detection and complexity scoring for TS and JS.

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

分析本地 JavaScript 和 TypeScript 覆盖率产物,找出未测试函数、评估复杂度并建议测试用例。

可以做什么
读取 lcov、Istanbul JSON 和 Cobertura 格式的本地覆盖率文件,报告哪些文件、函数、行和分支未被覆盖。其他工具可找出没有对应测试文件的源码函数,按圈复杂度、分支和循环为函数排序,并建议正常路径、边界、错误、异步和类型测试用例。另有命令行报告工具和 GitHub Action 可在 CI 中生成相同的优先级。所有分析均在本地运行。
适用场景
适用于已生成覆盖率输出的 JS 或 TS 项目,帮助判断哪些未覆盖代码应优先补测试。适合在 MCP 客户端中进行本地审查,以及在 CI 中传入已有覆盖率产物。它不能替代原生覆盖率数据和人工审查。
运行要求
通过 npx 作为本地 stdio 进程运行,需要 Node.js 18 或更高版本。无需账号、API 密钥或托管服务,也未声明环境变量。文件访问限于服务器启动目录;可选的 HTTP 模式监听 localhost 并读取 PORT。
安装前请注意
函数发现、源码与测试匹配以及复杂度评分均为启发式,缺少同名测试文件并不能证明函数在行为上未被测试。分析在本地进行,不需要网络访问,GitHub Action 只分析已有产物,不上传源码或覆盖率数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Test Intel,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[test-intel-mcp]

[npm version] [npm downloads] [CI] [MCP Registry] [MIT license]

test-intel-mcp

Turn JavaScript and TypeScript coverage artifacts into practical test priorities. The server reads local coverage and source files, identifies gaps, scores function complexity, and suggests focused test cases without sending code to an external service.

Tool page · npm · Listed in the official MCP Registry

[test-intel-mcp analyzing real p-limit coverage]

Start in one minute

Add one local server entry to any stdio-compatible MCP client:

json
{  "mcpServers": {    "test-intel": {      "command": "npx",      "args": ["-y", "@barissozudogru/test-intel-mcp"]    }  }}

Then ask the client to inspect an existing coverage file:

text
Use test-intel to analyze coverage/lcov.info, identify the highest-impact gaps,and suggest tests for the most complex uncovered function.

No account, API key, or hosted service is required. File access is restricted to the directory where the server starts.

Proof on this repository

Running the complexity tool against the real src/paths.ts file produces:

text
Function complexity analysis for: src/paths.tsTotal functions analyzed: 1
Priority | Function        | Line | Cyclomatic | Branches | Loops---------|-----------------|------|------------|----------|------low      | deriveTestPaths | 11   | 3          | 1        | 1
Summary: 0 critical, 0 high, 0 medium, 1 low priority

The same server reads lcov, Istanbul JSON, and Cobertura files to surface uncovered functions, lines, and branches.

A pinned p-limit 7.3.1 case study reproduces coverage from the upstream project's 22 passing tests. test-intel-report reduces its lcov artifact to two uncovered lines and one uncovered branch while preserving the original coverage file for inspection.

If this saves you time, consider starring the repository. It helps other developers find it.

Tools

ToolWhat it answers
analyze_test_coverageWhich files, functions, lines, and branches remain uncovered?
find_untested_functionsWhich source functions have no corresponding test file?
get_function_complexityWhich functions deserve testing attention first?
suggest_test_casesWhich happy path, boundary, error, async, and type cases should be reviewed?

Supported coverage formats:

FormatCommon producers
lcovJest, Vitest, nyc, Istanbul
Istanbul JSONJest, nyc, Istanbul
Cobertura XMLJest, pytest-cov, JaCoCo

Heuristic source-to-test matching and complexity scores are prioritization signals. Native coverage data and human review remain the source of truth.

Coverage report command

The package also includes a non-MCP command for CI and terminal use:

bash
npx -y -p @barissozudogru/test-intel-mcp test-intel-report coverage/lcov.info

An explicit format can be supplied when the filename is ambiguous:

bash
test-intel-report coverage/result.xml cobertura

GitHub Action

Generate coverage with the project's own test runner, then pass the resulting artifact to the action:

yaml
name: Test priorities
on: [pull_request]
jobs:  test-intel:    runs-on: ubuntu-latest    permissions:      contents: read    steps:      - uses: actions/checkout@v4      - name: Run tests with coverage        run: npm ci && npm test -- --coverage      - uses: barissozudogru/[email protected]        with:          coverage-path: coverage/lcov.info

The report is written to the workflow summary. The action analyzes an artifact that already exists and does not upload source or coverage data.

Client setup

Claude Desktop, Cursor, Windsurf, Cline, and similar clients

Use the stdio configuration from the quickstart. Config file locations differ by client, but the server entry is the same:

json
{  "mcpServers": {    "test-intel": {      "command": "npx",      "args": ["-y", "@barissozudogru/test-intel-mcp"]    }  }}
VS Code with Copilot

Create .vscode/mcp.json:

json
{  "servers": {    "test-intel": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@barissozudogru/test-intel-mcp"]    }  }}
Streamable HTTP

Start the local endpoint:

bash
npx @barissozudogru/test-intel-mcp --http

The MCP endpoint is http://localhost:3000/mcp and the health endpoint is http://localhost:3000/health. Set PORT to use another port.

Docker
bash
docker build -t test-intel-mcp .docker run -p 3000:3000 -v "$(pwd):/project" -w /project test-intel-mcp

Connect an HTTP client to http://localhost:3000/mcp.

Local development

bash
npm installnpm testnpm run buildnode dist/index.js

Requirements: Node.js 18 or newer.

See CONTRIBUTING.md for the development workflow.

Security and limits

  • Analysis runs locally and does not require network access.
  • Paths outside the server's starting directory are rejected.
  • Function discovery, source-to-test matching, and complexity scoring are heuristic.
  • A missing matching test filename does not prove a function is behaviorally untested.

License

MIT

来源:README.md,提交 4e2364e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.8.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分