Skip to content

Commit 5367fea

Browse files
committed
arthas-mcp-integration-test part 1
1 parent 7518088 commit 5367fea

File tree

4 files changed

+503
-0
lines changed

4 files changed

+503
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# arthas-mcp-integration-test
2+
3+
本模块提供 Arthas MCP Server 的集成测试:
4+
5+
- 测试会启动一个独立的目标 JVM(`TargetJvmApp`)。
6+
- 通过 `packaging/target/arthas-bin/as.sh` 动态 attach 到目标 JVM,在目标 JVM 内启动 Arthas Server(仅开启 HTTP 端口,telnet 端口设置为 0)。
7+
- 使用最小 MCP(Streamable HTTP + SSE)客户端调用 `tools/list``tools/call`,验证 MCP tools 功能可用。
8+
9+
## 运行方式
10+
11+
在项目根目录执行:
12+
13+
```bash
14+
./mvnw -pl arthas-mcp-integration-test -am verify
15+
```
16+
17+
说明:
18+
19+
- `-am` 会确保 `packaging` 等依赖模块先构建,从而在 `packaging/target/arthas-bin` 生成可用的 `as.sh` 与相关 jar。
20+
- 该集成测试依赖本机 `bash`,Windows 环境会自动跳过。
21+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.taobao.arthas</groupId>
9+
<artifactId>arthas-all</artifactId>
10+
<version>${revision}</version>
11+
<relativePath>../pom.xml</relativePath>
12+
</parent>
13+
14+
<artifactId>arthas-mcp-integration-test</artifactId>
15+
<name>arthas-mcp-integration-test</name>
16+
<url>https://github.com/alibaba/arthas</url>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>com.taobao.arthas</groupId>
21+
<artifactId>arthas-packaging</artifactId>
22+
<version>${project.version}</version>
23+
<scope>test</scope>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>com.taobao.arthas</groupId>
28+
<artifactId>arthas-mcp-server</artifactId>
29+
<version>${project.version}</version>
30+
<scope>test</scope>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.junit.jupiter</groupId>
35+
<artifactId>junit-jupiter</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.assertj</groupId>
40+
<artifactId>assertj-core</artifactId>
41+
<scope>test</scope>
42+
</dependency>
43+
</dependencies>
44+
45+
<build>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-surefire-plugin</artifactId>
50+
<version>3.2.5</version>
51+
<executions>
52+
<execution>
53+
<id>it-verify</id>
54+
<phase>verify</phase>
55+
<goals>
56+
<goal>test</goal>
57+
</goals>
58+
<configuration>
59+
<includes>
60+
<include>**/*IT.java</include>
61+
</includes>
62+
</configuration>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
</plugins>
67+
</build>
68+
69+
</project>

0 commit comments

Comments
 (0)