Back to MCP directory
publicPublicdnsLocal runtime

test-genie-mcp

Test Genie MCP是一个AI驱动的多平台应用测试自动化MCP服务器,支持iOS、Android、Flutter、React Native和Web应用,提供从场景生成、测试执行、问题检测到修复建议和自动修复的完整测试流程。

article

README

🚀 Test Genie MCP

Test Genie MCP 是一款由人工智能驱动的应用程序测试自动化 MCP 服务器,可实现多平台自动化测试,支持 iOS、Android、Flutter、React Native 和 Web 应用程序。

npm version License: MIT

English | 한국어


🚀 快速开始

Test Genie MCP 是一个强大的 AI 驱动的 MCP 服务器,用于自动化应用程序测试。它提供了从场景生成到测试执行、问题检测、修复建议和自动修复的完整测试管道。

✨ 主要特性

多平台支持

| 平台 | 语言 | 测试框架 | |------|------|----------| | iOS | Swift、Objective - C | XCTest、XCUITest、Instruments | | Android | Kotlin、Java | Espresso、UI Automator、Android Profiler | | Flutter | Dart | flutter_test、integration_test、Golden Tests | | React Native | TypeScript、JavaScript | Jest、Detox、RNTL | | Web | TypeScript、JavaScript | Playwright、Cypress、Lighthouse |

19 个 MCP 工具

| 类别 | 工具 | |------|------| | 分析 | analyze_app_structureanalyze_code_deepanalyze_performance | | 场景 | generate_scenarioscreate_test_plan | | 执行 | run_scenario_testrun_simulationrun_stress_test | | 检测 | detect_memory_leaksdetect_logic_errors | | 修复 | suggest_fixesconfirm_fixapply_fixrollback_fix | | 自动化 | run_full_automationgenerate_reportgenerate_cicd_config | | 管理 | get_pending_fixesget_test_history |

分析与场景生成

  • analyze_app_structure - 分析代码库结构(屏幕、组件、API、状态)
  • analyze_code_deep - 基于 AST 的代码分析(复杂度、钩子、依赖项)
  • analyze_performance - 深度性能分析(渲染、计算、网络、捆绑包)
  • generate_scenarios - 由 AI 驱动的测试场景生成
  • create_test_plan - 创建测试计划和时间表

测试执行

  • run_scenario_test - 执行单个场景测试
  • run_simulation - 用户行为模拟(基于随机/模式)
  • run_stress_test - 压力和负载测试

问题检测

  • detect_memory_leaks - 内存泄漏检测(堆分析、循环引用)
  • detect_logic_errors - 逻辑错误检测(竞态条件、状态不一致)

修复建议与应用

  • suggest_fixes - 由 AI 驱动的修复建议
  • confirm_fix - 用户确认修复
  • apply_fix - 应用已确认的修复
  • rollback_fix - 回滚已应用的修复

自动化与 CI/CD

  • run_full_automation - 自动运行完整的管道
  • generate_report - 生成详细报告(Markdown、HTML、JSON)
  • generate_cicd_config - 生成 CI/CD 配置(GitHub Actions、Jenkins、GitLab CI)

管理

  • get_pending_fixes - 获取待处理的修复建议列表
  • get_test_history - 获取测试执行历史记录

📦 安装指南

使用 npm 全局安装

npm install -g test-genie-mcp

从源代码安装

git clone https://github.com/MUSE-CODE-SPACE/test-genie-mcp.git
cd test-genie-mcp
npm install
npm run build

💻 使用示例

与 Claude Desktop 配合使用

将以下内容添加到 Claude Desktop 配置文件 (~/.config/claude/claude_desktop_config.json) 中:

{
  "mcpServers": {
    "test-genie": {
      "command": "npx",
      "args": ["test-genie-mcp"]
    }
  }
}

或者使用 Claude CLI:

claude mcp add test-genie-mcp npx test-genie-mcp

示例用法

全自动化测试

用户: "运行自动化测试"

Claude 将执行以下操作:
1. 分析您的应用结构
2. 生成测试场景
3. 执行测试
4. 检测问题(内存泄漏、逻辑错误)
5. 提出修复建议
6. 等待您的确认
7. 应用已批准的修复
8. 生成报告

分步测试

# 分析应用
analyze_app_structure(projectPath: "/path/to/app")

# 生成场景
generate_scenarios(projectPath: "/path/to/app", testTypes: ["e2e", "unit"])

# 检测内存泄漏
detect_memory_leaks(projectPath: "/path/to/app")

# 获取修复建议
suggest_fixes(projectPath: "/path/to/app")

# 确认并应用修复
confirm_fix(fixId: "xxx", action: "approve")
apply_fix(fixId: "xxx")

📚 详细文档

修复确认工作流程

当检测到问题时,Test Genie 将执行以下操作:

  1. 提出修复建议:生成带有置信度分数的 AI 驱动的修复建议。
  2. 显示差异:准确显示将要更改的内容。
  3. 等待确认:等待用户批准。
  4. 应用修复:仅在明确批准后应用。
  5. 备份:在应用之前自动创建备份。

📄 许可证

本项目采用 MIT 许可证。

作者

Yoonkyoung Gong

链接

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client