本章说明 ShardingSphere-MCP 的端到端契约验证和 LLM smoke 验证。
test/e2e/mcp 覆盖:
先安装 MCP E2E 依赖模块到本地仓库:
./mvnw -pl test/e2e/mcp -am install -DskipTests -DskipITs -Dspotless.skip=true -B -ntp
MCP LLM lane 默认使用本地 Docker image 承载 OpenAI-compatible endpoint。 构建前建议先查看 Docker 占用:
docker system df
只校验本机架构选择,不下载模型:
sh test/e2e/mcp/src/test/resources/docker/llm-runtime/build-local.sh --dry-run
构建本地 runtime image:
sh test/e2e/mcp/src/test/resources/docker/llm-runtime/build-local.sh
./mvnw -pl test/e2e/mcp -Pllm-e2e test -DskipITs -Dspotless.skip=true \
-Dtest=LLMSmokeE2ETest \
-Dsurefire.failIfNoSpecifiedTests=true
./mvnw -pl test/e2e/mcp -Pllm-e2e test -DskipITs -Dspotless.skip=true \
-Dtest=LLMUsabilitySuiteE2ETest \
-Dsurefire.failIfNoSpecifiedTests=true
仅本地调试时,可以连接已经运行的 OpenAI-compatible endpoint:
./mvnw -pl test/e2e/mcp -Pllm-e2e test -DskipITs -Dspotless.skip=true \
-Dtest=LLMSmokeE2ETest \
-Dmcp.llm.runtime-mode=external-debug \
-Dmcp.llm.base-url=http://127.0.0.1:8080/v1 \
-Dsurefire.failIfNoSpecifiedTests=true
External debug endpoint 不能作为 score-closing evidence。
LLM artifact 写入:
test/e2e/mcp/target/llm-e2e/
GitHub Actions 入口:
.github/workflows/mcp-llm-e2e.yml.github/workflows/mcp-llm-usability-e2e.yml这两条检查用于提供额外可见性,不应单独配置成 branch protection 或 ruleset 的 required check。
如果超大 PR 因 path filter 限制漏触发,可以使用 workflow_dispatch 手动补充 evidence。
