agentleFS
fitlab-aifitlab-ai/agent-infra/.agents/skills/test-integration/SKILL.md

test-integration

Skill88 starsChanged 19 days agoMITView on GitHub

执行项目集成测试流程。 当需要运行集成测试或端到端验证时使用。

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

运行集成测试

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

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. 清理:确保测试完成后清理测试环境

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.