Token导航 LogoToken导航TokenDH.com
SE333 MCP Testing Agent logo
开发工具stdio官方级别未说明来源级核验

SE333 MCP Testing Agent

MCP Server

一个智能MCP代理,自动生成测试用例,使用JaCoCo测量代码覆盖率,识别缺失的测试,并迭代提高Java类的测试覆盖率至90%以上。

工具数

13

提示词数

0

GitHub Stars

0

资源数

0
自动化测试PythonVS CodeVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

SidiqaFekrat

提供方

SidiqaFekrat

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

Python 3.8+

详细介绍

AI驱动的测试代理:

一个智能MCP代理,可以自动生成测试,使用JaCoCo测量代码覆盖率,使用覆盖率识别缺失的测试,并迭代地将java类的测试覆盖率提高到90%以上。

安装和设置:

先决条件:

    Python 3.8+
    Java 11+
    Maven 3.6+
    Node.js 18+
    Git

安装步骤:

  1. 克隆并导航到项目:

cd最终项目_se333_sidiqa

  1. 创建虚拟环境:

紫外线真空 source.ven/bin/activate

  1. 安装MCP依赖项:

uv添加'mcp\[cli\]'httpx-fastmcp

  1. 启动MCP服务器:

python3代码库/server.py

跑步后,你应该看到:Uvicorn正在跑步http://127.0.0.1:8000

在VS代码中配置: 1.按CTRL+SHIFT+P搜索MCP:添加服务器 2.从运行codebase/server.py的输出中输入URL:http://127.0.0.1:8000/sse 3.名称:检测试剂 4.启用聊天:在VS代码设置中自动批准 5.刷新VS Code Chat查看应该可见的MCP工具

MCP工具文档:

文件:codebase/server.py(17个工具)

阶段1-2:测试生成和覆盖。

1. analyze_java_code(file_path):
    Input: Java file path.
    Output: Methods with signatures
    Purpose: Extract methods for testing

2. generate_test_template(class_name, methods)
    Input: Class name plus methods dict
    Output: JUnit test class code
    Purpose: generate Unit tests

3. run_maven_tests(project_path)
    Input: Project path
    Output: Test results with the coverage info
    Purpose: Get coverage metrics

4. total_coverage(project_path)
    Input: Project path
    Output:Line/branch/method/instruction %
    Purpose: Get coverage info 

5. missing_coverage(file_path, project_path)
    Input: File path + project path
    Output: List of uncovered lines
    Purpose: Identify missing coverage if there is any

6. find_jacoco_path(project_path)
    Input: Project path
    Output: Path to jacoco.xml
    Purpose: Locate coverage report

第三阶段:Git自动化

1. git_status(repo_path)
    Input: Repo path
    Output: Staged / unstaged changes
    Purpose: Check repository status

2. git_add_all(repo_path)
    Input: Repo path
    Output: Stage the changes in the java files and the new added tests by the agent
    Purpose: Stage changes (excludes build artifacts)

3. git_commit(repo_path, message, coverage)
    Input: Repo path + message + coverage dict
    Output: commit the changes and the coverage result
    Purpose: Commit with coverage stats

4. git_push(repo_path, remote, branch)
    Input: Repo path + remote + branch
    Output: Push result
    Purpose: Push the commited changes to remote repo

5. git_pull_request(repo_path, base, title, body, coverage)
    Input: Repo path + base + metadata
    Output: PR URL or manual instructions
    Purpose: Create pull request

第五阶段:创意延伸

1. generate_specification_tests(java_file_path, class_name)
    Input: Java file path + class name
    Output: Test class with boundary, equivalence, and decision table tests
    Purpose: Advanced specification-based testing

2. code_review(file_path)
    Input: Java file path
    Output: Issues list with auto-fixes
    Purpose: Detects code smells, security issues, style violations

代理工作流:

文件:tester.prompt.md

步骤1-9(阶段4-5:覆盖迭代):

1. Analyze all the source files.
2. Generate tests for them.
3. Run tests with JaCoCo to get the coverage info.
4. Fix error if needed.
5. Locate the coverage report.
6. parse the coverage metrics.
7. Identify uncovered lines
8. Generate additional tests if there is missing coverage.
9. Repeat until 90%+ coverage
10. Generate specification-based tests
11. Review code quality
12. Check git status
13. Stage files
14. Commit with coverage stats
15. Push to origin
16. Create PR against main

使用示例:

打开VS Code聊天并键入(运行#tester.prompt.md)

故障排除:

  1. 问题:使用uv时,添加mcp\[cli\]httpx-fastmcp,并显示“未找到匹配项:mcp\[cri\]”

解决方案:运行uv-add“mcp\[cli\]”httpx-fastmcp

  1. 问题:未找到JaCoCo报告

解决方案:运行mvn clean测试jacoco:代码库中的报告/

  1. 问题:MCP服务器无法启动

解决方案:验证:python3-c“import fastmcp”工作正常

  1. 问题:聊天中未显示工具

解决方案:重新启动VS Code并重新连接MCP服务器

目录标签

目录标签

自动化测试PythonVS Code本地部署代码覆盖率Java开发测试生成Git集成

支持客户端

VS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

13

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP