运行集成测试

SkillAI & models

Lets your agent build the project and run its integration and end-to-end tests, then report pass/fail results.

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the 运行集成测试 skill

About this skill

Runs the project's integration test workflow. Use when you need to run integration tests or end-to-end verification.

What this skill tells your AI

The instructions your AI receives, as published by fitlab-ai/agent-infra in .agents/skills/test-integration/SKILL.md and read by ahel’s review.

执行项目的集成测试流程,进行端到端验证。

1. 验证构建产物

项目使用 TypeScript。npm run test:integration 会先运行 npm run build,再执行集成与端到端测试,因此无需单独重复构建。

2. 运行集成测试

npm run test:integration

该脚本先构建项目,再运行 tests/integration/**/*.test.ts 和 tests/e2e/**/*.test.ts,并启用 Node.js TypeScript strip-types 支持。

3. 输出结果

报告结果:

  • 运行/通过/失败的测试数
  • 环境问题(如有)
  • 失败详情(如有)

失败处理

如果测试失败:

  • 输出失败详情
  • 检查环境问题(端口占用、服务未运行等)
  • 不要自动修复 —— 等待用户决定

后续步骤

测试通过后,建议提交变更:

渲染下一步前先读取 .agents/rules/next-step-output.md,仅为已选场景调用统一 helper,并将 stdout 填入 {next-step-commands}。

使用 agent-infra-internal agent-client next-steps --skill commit 生成本场景的 {next-step-commands}。

下一步 - 提交代码:
{next-step-commands}

注意事项

  1. 前置条件:Node.js >= 22.9.0;脚本会自动构建
  2. 环境:集成测试可能需要外部服务(数据库、API 等)
  3. 超时:集成测试通常耗时较长;请耐心等待
  4. 清理:确保测试完成后清理测试环境

Signals

GitHub stars
86
Forks
5
Last commit
Oct 2026
Advanced
Item type
skill
Key
test-integration-fitlab-ai
Source
github.com/fitlab-ai/agent-infra
运行集成测试 (test-integration) by fitlab-ai: Skill · ahel