Skip to main content
Glama
strelec00

testmo-mcp

by strelec00

Testmo MCP 服务器

一个用于 Testmo 的 Python 模型上下文协议 (MCP) 服务器 —— 为 Claude Desktop、Cursor 和任何兼容 MCP 的客户端带来 AI 辅助的测试管理功能。

Python FastMCP MCP

Testmo MCP 是一个开源的 MCP 服务器,可将 Claude DesktopClaude CodeCursor 等 AI 助手直接连接到您的 Testmo 测试管理实例。无需离开 AI 客户端,即可通过自然语言管理测试用例、文件夹、里程碑、运行、附件和 CI/CD 自动化源。

专为使用 Testmo 且希望摆脱重复性 UI 点击工作的 QA 工程师、SDET 和开发人员打造。由 FastMCP 和 Testmo REST API 提供支持。


✨ 功能

  • 🧪 完整的测试用例管理 — 创建、读取、更新、删除、搜索以及对 Testmo 用例进行批量操作

  • 📁 文件夹操作 — 创建、重命名、移动、删除并递归遍历文件夹树

  • 🚀 批量操作 — 每次调用可创建或更新多达 100 个用例,或通过自动批处理实现无限制操作

  • 🏃 测试运行与结果 — 列出运行、获取运行详情并筛选运行结果

  • 🎯 里程碑 — 列出并检查各项目中的里程碑

  • 📎 附件 — 上传、列出和删除测试用例上的文件附件

  • 🤖 CI/CD 自动化源 — 管理自动化运行、并行线程和结果提交

  • 🔗 问题集成 — 列出 GitHub、Jira 和其他问题连接

  • 🌳 递归助手 — 一次调用即可获取整个文件夹子树的用例

  • 🛠️ 字段映射工具 — 无需猜测即可解析优先级、类型和状态 ID

  • 🤝 适用于任何 MCP 客户端 — Claude Desktop、Claude Code、Cursor、Cline 等


🚀 快速开始

先决条件

  • Python 3.11 或更高版本

  • uv 包管理器

  • Testmo 实例和 API 密钥(在 Testmo 的 设置 → API 密钥 中)

  • 兼容 MCP 的客户端(Claude Desktop、Cursor 等)

安装

git clone https://github.com/strelec00/testmo-mcp.git
cd testmo-mcp
uv sync

配置

在项目根目录创建一个 .env 文件:

TESTMO_URL=https://your-instance.testmo.net
TESTMO_API_KEY=your-api-key

连接到 Claude Desktop

将以下内容添加到您的 Claude Desktop 配置文件中:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "testmo": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/testmo-mcp", "run", "testmo-mcp.py"],
      "env": {
        "TESTMO_URL": "https://your-instance.testmo.net",
        "TESTMO_API_KEY": "your-api-key"
      }
    }
  }
}

重启 Claude Desktop。Testmo 工具将出现在 MCP 工具列表中。

💡 您可以通过 .env 或上面的 env 块传递凭据 —— 两者均可使用。

连接到 Cursor

打开 Cursor 设置 → MCP(或编辑 ~/.cursor/mcp.json)并使用相同的 JSON 片段。

开发/测试模式

uv run mcp dev testmo-mcp.py

💬 示例提示词

连接后,尝试询问您的 AI 助手:

  • “列出 Testmo 中的所有项目,并向我展示名为 Certilligent 的项目。”

  • “创建 20 个登录测试用例,涵盖有效凭据、错误密码、锁定账户、会话过期和 2FA 流程。”

  • “找到 'Smoke Tests' 文件夹,并递归列出其中所有高优先级的用例。”

  • “批量更新文件夹 42 中的所有草稿用例,将其优先级设置为高。”

  • “向我展示 Playwright 源的最新自动化运行,并附加一组新的结果线程。”

  • “将此截图作为附件上传到测试用例 1234。”


🧠 为什么要将 Testmo 与 MCP 一起使用?

传统的 Testmo 工作流程需要为每个测试用例、每个文件夹、每次批量更新导航 UI。有了 Testmo MCP,您的 AI 助手将成为 QA 副驾驶:

  • 在几秒钟内根据功能规范或 PRD 生成整个测试套件

  • 通过对话而非点击来重构文件夹结构

  • 在不切换上下文的情况下保持 Testmo 与代码库同步

  • Claude Code 配对进行端到端 QA 自动化:生成 Playwright 测试在 Testmo 中注册它们

  • 直接从终端会话连接 CI/CD 自动化运行


🔧 可用工具

项目

工具

描述

testmo_list_projects

列出所有项目

testmo_get_project

获取项目详情

文件夹

工具

描述

testmo_list_folders

列出带有完整路径的文件夹

testmo_get_folder

获取文件夹详情

testmo_create_folder

创建文件夹

testmo_update_folder

更新文件夹名称/父级

testmo_delete_folder

删除文件夹及其用例

testmo_find_folder_by_name

按名称查找文件夹

测试用例

工具

描述

testmo_list_cases

列出用例(分页)

testmo_get_all_cases

获取所有用例(自动分页)

testmo_get_case

获取单个用例详情

testmo_create_case

创建一个用例

testmo_create_cases

创建多达 100 个用例

testmo_batch_create_cases

创建无限用例(自动批处理)

testmo_update_case

更新一个用例

testmo_batch_update_cases

批量更新多达 100 个用例

testmo_delete_case

删除一个用例

testmo_batch_delete_cases

删除多个用例(自动批处理)

testmo_search_cases

使用过滤器搜索用例

里程碑

工具

描述

testmo_list_milestones

列出里程碑

testmo_get_milestone

获取里程碑详情

测试运行

工具

描述

testmo_list_runs

列出测试运行

testmo_get_run

获取运行详情

testmo_list_run_results

使用过滤器列出运行结果

附件

工具

描述

testmo_list_case_attachments

列出用例附件

testmo_upload_case_attachment

上传文件 (base64)

testmo_delete_case_attachments

删除附件

自动化 (CI/CD)

工具

描述

testmo_list_automation_sources

列出 CI/CD 源

testmo_get_automation_source

获取源详情

testmo_list_automation_runs

列出自动化运行

testmo_get_automation_run

获取自动化运行详情

testmo_create_automation_run

创建自动化运行

testmo_append_automation_run

附加构件/字段/链接

testmo_complete_automation_run

完成自动化运行

testmo_create_automation_run_thread

创建并行线程

testmo_append_automation_run_thread

向线程提交测试结果

testmo_complete_automation_run_thread

完成线程

问题连接

工具

描述

testmo_list_issue_connections

列出集成(GitHub、Jira 等)

testmo_get_issue_connection

获取集成详情

递归/复合

工具

描述

testmo_get_folders_recursive

获取文件夹树

testmo_get_cases_recursive

从文件夹树获取所有用例

testmo_search_cases_recursive

在文件夹子树内搜索

实用工具

工具

描述

testmo_get_field_mappings

获取字段值 ID(优先级、类型、状态)

testmo_get_web_url

生成 Testmo Web URL


🛠️ 故障排除

在 Claude Desktop 中显示 "Tool not found"args 中使用绝对路径,并在编辑配置后完全重启 Claude Desktop。

401 Unauthorized 仔细检查 TESTMO_API_KEY,并确保该密钥在 Testmo 的 设置 → API 密钥 中已启用 API 访问权限。

uv: command not found 安装 uvcurl -LsSf https://astral.sh/uv/install.sh | sh


🤝 贡献

欢迎提交 PR。对于较大的更改,请先开启一个 issue。


📄 许可证

MIT


🔗 相关项目


关键词: testmo mcp, testmo claude, testmo ai 集成, mcp 服务器 testmo, 模型上下文协议 testmo, testmo python, testmo api 客户端, fastmcp testmo, ai 测试管理, qa 自动化 claude, testmo cursor, testmo 自动化 api, testmo 批量创建用例, anthropic mcp 服务器

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/strelec00/testmo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server