Loading...
Loading...
Compare original and translation side by side
| Use this skill when... | Use another approach when... |
|---|---|
| Setting up integration testing infrastructure with Supertest, pytest, or Testcontainers | Writing individual integration test cases for specific endpoints |
| Creating docker-compose.test.yml for local test service containers | Running existing integration tests ( |
| Auditing integration test setup for completeness (fixtures, factories, CI) | Configuring unit test runners ( |
| Adding integration test jobs to GitHub Actions with service containers | Debugging a specific failing integration test |
| Separating integration tests from unit tests in project structure | Setting up API contract testing ( |
| 以下场景使用该技能... | 以下场景使用其他方案... |
|---|---|
| 使用Supertest、pytest或Testcontainers搭建集成测试基础设施 | 为特定端点编写单个集成测试用例 |
| 创建docker-compose.test.yml用于本地测试服务容器 | 运行已有的集成测试( |
| 审核集成测试设置的完整性(fixtures、工厂、CI) | 配置单元测试运行器(改用 |
| 为GitHub Actions添加包含服务容器的集成测试任务 | 调试特定失败的集成测试 |
| 在项目结构中分离集成测试与单元测试 | 配置API契约测试(改用 |
pwdfind . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' \) 2>/dev/nullfind tests -maxdepth 1 -type d -name 'integration' 2>/dev/nullfind . -maxdepth 1 -name 'docker-compose.test.yml' 2>/dev/nullfind . -maxdepth 1 -name 'vitest.integration.config.*' 2>/dev/nullgrep -l 'supertest' package.json 2>/dev/nullgrep -l 'testcontainers' package.json pyproject.toml 2>/dev/nullfind . -maxdepth 1 -name '.project-standards.yaml' 2>/dev/nullpwdfind . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' \) 2>/dev/nullfind tests -maxdepth 1 -type d -name 'integration' 2>/dev/nullfind . -maxdepth 1 -name 'docker-compose.test.yml' 2>/dev/nullfind . -maxdepth 1 -name 'vitest.integration.config.*' 2>/dev/nullgrep -l 'supertest' package.json 2>/dev/nullgrep -l 'testcontainers' package.json pyproject.toml 2>/dev/nullfind . -maxdepth 1 -name '.project-standards.yaml' 2>/dev/null--check-only--fix--framework <supertest|pytest|testcontainers>#[ignore]--check-only--fix--framework <supertest|pytest|testcontainers>#[ignore]| Indicator | Component | Status |
|---|---|---|
| Integration tests | Present |
| Container testing | Configured |
| HTTP testing | Configured |
| Test services | Present |
| pytest integration | Configured |
| 指标 | 组件 | 状态 |
|---|---|---|
| 集成测试 | 已存在 |
依赖中包含 | 容器测试 | 已配置 |
package.json中包含 | HTTP测试 | 已配置 |
| 测试服务 | 已存在 |
带有 | pytest集成 | 已配置 |
tests/integration/supertest@testcontainers/postgresqltestcontainershttpxrequestspytest-asynciointegrationconftest.pydocker-compose.test.ymltests/integration/supertest@testcontainers/postgresqltestcontainershttpxrequestspytest-asynciointegrationconftest.pydocker-compose.test.ymlIntegration Testing Compliance Report
======================================
Project: [name]
Language: [TypeScript | Python | Rust | Go]
Test Organization:
Integration directory tests/integration/ [EXISTS | MISSING]
Separated from unit not in src/ [CORRECT | MIXED]
Test fixtures tests/fixtures/ [EXISTS | MISSING]
Database seeds tests/seeds/ [EXISTS | N/A]
Framework Setup:
HTTP testing supertest/httpx [INSTALLED | MISSING]
Container testing testcontainers [INSTALLED | MISSING]
Async support pytest-asyncio [INSTALLED | N/A]
Infrastructure:
docker-compose.test.yml test services [EXISTS | MISSING]
Test database PostgreSQL/SQLite [CONFIGURED | MISSING]
Service isolation network config [CONFIGURED | MISSING]
CI/CD Integration:
Integration test job GitHub Actions [CONFIGURED | MISSING]
Service containers workflow services [CONFIGURED | MISSING]
Overall: [X issues found]
Recommendations:
- Install testcontainers for database testing
- Create docker-compose.test.yml for local testing
- Add integration test job to CI workflow--check-only集成测试合规性报告
======================================
项目: [名称]
语言: [TypeScript | Python | Rust | Go]
测试组织:
集成测试目录 tests/integration/ [已存在 | 缺失]
与单元测试分离 不在src/目录中 [正确 | 混合]
测试fixtures tests/fixtures/ [已存在 | 缺失]
数据库填充脚本 tests/seeds/ [已存在 | 不适用]
框架设置:
HTTP测试 supertest/httpx [已安装 | 缺失]
容器测试 testcontainers [已安装 | 缺失]
异步支持 pytest-asyncio [已安装 | 不适用]
基础设施:
docker-compose.test.yml 测试服务 [已存在 | 缺失]
测试数据库 PostgreSQL/SQLite [已配置 | 缺失]
服务隔离 网络配置 [已配置 | 缺失]
CI/CD集成:
集成测试任务 GitHub Actions [已配置 | 缺失]
服务容器 工作流服务 [已配置 | 缺失]
整体状态: [发现X个问题]
建议:
- 安装testcontainers用于数据库测试
- 创建docker-compose.test.yml用于本地测试
- 为CI工作流添加集成测试任务--check-onlytests/integration/tests/integration/docker-compose.test.ymldocker-compose.test.yml.github/workflows/test.yml.github/workflows/test.ymltests/fixtures/factories.tstests/fixtures/factories.ts.project-standards.yamlstandards_version: "2025.1"
last_configured: "[timestamp]"
components:
integration_tests: "2025.1"
integration_tests_framework: "[supertest|pytest|testcontainers]"
integration_tests_containers: true
integration_tests_ci: true.project-standards.yamlstandards_version: "2025.1"
last_configured: "[时间戳]"
components:
integration_tests: "2025.1"
integration_tests_framework: "[supertest|pytest|testcontainers]"
integration_tests_containers: true
integration_tests_ci: true| Context | Command |
|---|---|
| Quick compliance check | |
| Auto-fix all issues | |
| Run integration tests (JS) | |
| Run integration tests (Python) | |
| Start test containers | |
| Check container health | `docker compose -f docker-compose.test.yml ps --format json |
| 上下文 | 命令 |
|---|---|
| 快速合规性检查 | |
| 自动修复所有问题 | |
| 运行集成测试(JS) | |
| 运行集成测试(Python) | |
| 启动测试容器 | |
| 检查容器健康状态 | `docker compose -f docker-compose.test.yml ps --format json |
| Flag | Description |
|---|---|
| Report status without offering fixes |
| Apply all fixes automatically without prompting |
| Override framework detection (supertest, pytest, testcontainers) |
| 标志 | 描述 |
|---|---|
| 仅报告状态,不提供修复选项 |
| 自动应用所有修复,无需提示 |
| 覆盖框架自动检测(supertest、pytest、testcontainers) |
undefinedundefinedundefinedundefined/configure:tests/configure:api-tests/configure:coverage/configure:all/configure:tests/configure:api-tests/configure:coverage/configure:all