testcase-generator-mcp
基于 Model Context Protocol (MCP) 的测试用例生成服务,让 AI 助手根据需求文档、技术文档、设计稿等上下文自动生成 Markdown 格式的测试用例,并可选导出为 Xmind 思维导图。
功能特性
- 测试用例生成:根据需求描述、技术文档等上下文生成结构化 Markdown 测试用例
- Xmind 导出:可选将测试用例生成为 Xmind 思维导图文件
- 多传输方式:支持 stdio(本地)、SSE、streamable HTTP
- 本地与远程:可在本机或作为远程 MCP 服务使用
使用方式
服务支持三种传输方式:
1. Stdio 传输(本地使用)
uvx testcase-generator-mcp stdio
Cursor / IDE 的 MCP 配置示例:
{
"mcpServers": {
"testcase-generator": {
"command": "uvx",
"args": [
"testcase-generator-mcp",
"stdio"
]
}
}
}
2. SSE 传输
uvx testcase-generator-mcp sse
SSE 连接配置:
{
"mcpServers": {
"testcase-generator": {
"url": "http://localhost:8018/sse"
}
}
}
3. Streamable HTTP 传输
uvx testcase-generator-mcp streamable_http
Streamable HTTP 连接配置:
{
"mcpServers": {
"testcase-generator": {
"url": "http://localhost:8018/mcp"
}
}
}
环境变量
SSE 与 Streamable HTTP
以 SSE 或 Streamable HTTP 方式运行时,可通过环境变量控制监听地址与端口:
| 变量 | 说明 | 默认值 |
|---|---|---|
FASTMCP_HOST |
监听地址 | 0.0.0.0 |
FASTMCP_PORT |
监听端口 | 8018 |
Stdio 传输
使用 stdio 时无需配置上述环境变量,按本地进程方式运行即可。
可用工具
generate_test_case
根据需求文档、技术文档、设计稿等上下文生成 Markdown 格式测试用例;可选生成 Xmind 思维导图。
generate_test_case(
is_need_xmind: bool = False
) -> str
is_need_xmind: 是否需要生成 Xmind 思维导图文件,默认为 False;仅在用户明确提及「xmind」「思维导图」等时设为 TrueReturns: 生成的测试用例内容 Markdown 文本;若is_need_xmind=True则同时生成 .xmind 文件
MCP 调用示例
详见 调用过程示例
License
MIT License,详见 LICENSE
Metadata
Release files for testcase-generator-mcp 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| testcase_generator_mcp-0.1.7.tar.gz | 9.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| testcase_generator_mcp-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 kB
Release files / testcase_generator_mcp-0.1.7.tar.gz
| Download URL | testcase_generator_mcp-0.1.7.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc374fc7825a632866a06ca0609b8380b7ba584659b6887e56d0dc45f80b0fff
|
|
BLAKE2b-256 checksum How to use checksums |
7f9f44df21789c69ce48eb8d2b74b279682f212b2ed95d123421ab6b5a305810
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / testcase_generator_mcp-0.1.7-py3-none-any.whl
| Download URL | testcase_generator_mcp-0.1.7-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54c24def6c2ca876ebee46887067390974641972d6c8681b418b1507013cf907
|
|
BLAKE2b-256 checksum How to use checksums |
b732c4b818866210dfb7adfe905f44b7a58d1024b3657e26c87769c1a3fcdea6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for testcase-generator-mcp 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.