Unit Test Generator

by hanqizheng

286 downloads
Not rated
GitHub

Description

# Unit Test Generator 一个 MCP 协议的单元测试生成器。 ## 使用 ``` git clone git@github.com:hanqizheng/unit-test-generator-mcp-server.git cd unit-test-generator-mcp-server npm install npm run build ``` ## 在 Cursor 完成集成 1. Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP…

About

# Unit Test Generator 一个 MCP 协议的单元测试生成器。 ## 使用 ``` git clone git@github.com:hanqizheng/unit-test-generator-mcp-server.git cd unit-test-generator-mcp-server npm install npm run build ``` ## 在 Cursor 完成集成 1. Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP server 2. 输入以下配置 ```json { "mcpServers": {…

Details

Author
hanqizheng
Downloads
286
Categories
Developer Tools

- Generates unit tests for component libraries
- Integrates with Cursor via MCP protocol
- Uses stdio transport for local execution
- Requires only Node.js and npm

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Unit Test Generator
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install dependencies with npm install, and build with npm run build. Then add it as a global MCP server in Cursor by providing a JSON configuration that specifies the command (node), the path to the built index file, the PROJECT_PATH environment variable pointing to your component library, and the transport type (stdio).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "unit test generator": {
            "unit-test-generator": {
                "command": "node",
                "args": [
                    "YOUR_MCP_SERVER_BUILD_INDEX_PATH"
                ],
                "env": {
                    "PROJECT_PATH": "YOUR_COMPONENT_LIBRARY_PROJECT_PATH"
                },
                "transport": "stdio",
                "enabled": true,
                "description": "component library unit test generator"
            }
        }
    }
}

McpServers

{
    "unit-test-generator": {
        "command": "node",
        "args": [
            "YOUR_MCP_SERVER_BUILD_INDEX_PATH"
        ],
        "env": {
            "PROJECT_PATH": "YOUR_COMPONENT_LIBRARY_PROJECT_PATH"
        },
        "transport": "stdio",
        "enabled": true,
        "description": "component library unit test generator"
    }
}

Unit Test Generator

一个 MCP 协议的单元测试生成器。

使用

git clone git@github.com:hanqizheng/unit-test-generator-mcp-server.git

cd unit-test-generator-mcp-server

npm install

npm run build

在 Cursor 完成集成

1. Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP server

2. 输入以下配置

{
  "mcpServers": {
    "unit-test-generator": {
      "command": "node",
      "args": ["YOUR_MCP_SERVER_BUILD_INDEX_PATH"],
      "env": {
        "PROJECT_PATH": "YOUR_COMPONENT_LIBRARY_PROJECT_PATH"
      },
      "transport": "stdio",
      "enabled": true,
      "description": "component library unit test generator"
    }
  }
}
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.