Loading...
Loading...
Compare original and translation side by side
| File | Runner | Ecosystem |
|---|---|---|
| npm/yarn/pnpm/bun | Node.js |
| Jest | Node.js |
| Vitest | Node.js |
| Mocha | Node.js |
| Playwright | Node.js (E2E) |
| Cypress | Node.js (E2E) |
| pytest | Python |
| cargo test | Rust |
| go test | Go |
| JUnit/TestNG | Java |
| make | Any |
| task | Any |
| CI config | Any (check for test commands) |
| 文件 | 运行器 | 生态系统 |
|---|---|---|
| npm/yarn/pnpm/bun | Node.js |
| Jest | Node.js |
| Vitest | Node.js |
| Mocha | Node.js |
| Playwright | Node.js (E2E) |
| Cypress | Node.js (E2E) |
| pytest | Python |
| cargo test | Rust |
| go test | Go |
| JUnit/TestNG | Java |
| make | 任意 |
| task | 任意 |
| CI配置 | 任意(检查测试命令) |
Common patterns:
- **/*.test.{ts,tsx,js,jsx} # Co-located tests
- **/*.spec.{ts,tsx,js,jsx} # Co-located specs
- __tests__/**/* # Test directories
- tests/**/* # Top-level test dir
- test/**/* # Alternative test dir
- *_test.go # Go tests
- test_*.py, *_test.py # Python tests
- **/*_test.rs # Rust tests常见模式:
- **/*.test.{ts,tsx,js,jsx} # 同目录测试文件
- **/*.spec.{ts,tsx,js,jsx} # 同目录规格文件
- __tests__/**/* # 测试目录
- tests/**/* # 顶层测试目录
- test/**/* # 备选测试目录
- *_test.go # Go测试文件
- test_*.py, *_test.py # Python测试文件
- **/*_test.rs # Rust测试文件npm run lintruff checkcargo clippynpm run typecheckmypycargo checknpm run format:checkruff format --checknpm run lintruff checkcargo clippynpm run typecheckmypycargo checknpm run format:checkruff format --check$ARGUMENTSallbaseline📋 Test Infrastructure Discovery
Runner: [name] ([version if available])
Command: [exact command to run]
Config: [config file path]
Test Files: [count] files
- Unit: [count] ([pattern])
- Integration: [count] ([pattern])
- E2E: [count] ([pattern])
Quality Commands:
- Lint: [command or "not found"]
- Typecheck: [command or "not found"]
- Format: [command or "not found"]$ARGUMENTSallbaseline📋 测试基础设施发现结果
运行器: [名称]([版本,如果可用])
命令: [要运行的确切命令]
配置: [配置文件路径]
测试文件: [数量]个
- 单元测试: [数量]([模式])
- 集成测试: [数量]([模式])
- E2E测试: [数量]([模式])
质量检查命令:
- 代码检查: [命令或“未找到”]
- 类型检查: [命令或“未找到”]
- 格式检查: [命令或“未找到”]AskUserQuestionCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSAskUserQuestionCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS📊 Baseline Captured
Total: [N] tests
✅ Passing: [N]
❌ Failing: [N]
⏭️ Skipped: [N]
[If failures exist:]
Pre-existing failures (YOU STILL OWN THESE):
1. [test name] — [brief error]
2. [test name] — [brief error]
Note: These failures exist before your changes.
Per the ownership mandate, you are responsible for
fixing these if you proceed with changes in this codebase.📊 基准线已捕获
总计: [N]个测试
✅ 通过: [N]
❌ 失败: [N]
⏭️ 跳过: [N]
[如果存在失败:]
已存在的失败(你仍需负责):
1. [测试名称] —— [简短错误信息]
2. [测试名称] —— [简短错误信息]
注意:这些失败在你进行改动之前就已存在。
根据所有权规则,如果你继续在该代码库中进行改动,你有责任修复这些问题。Requiresenabled in settings.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
需要在设置中启用。CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
test-{project-name}| Teammate | Category | subagent_type |
|---|---|---|
| Unit tests | |
| Integration tests | |
| E2E tests | |
| Lint + Typecheck | |
Fallback: If team plugin agents are unavailable, usefor all.general-purpose
test-{project-name}| 团队成员 | 类别 | subagent_type |
|---|---|---|
| 单元测试 | |
| 集成测试 | |
| E2E测试 | |
| 代码检查 + 类型检查 | |
备选方案:如果团队插件Agent不可用,所有类别都使用。general-purpose
shutdown_requestshutdown_request🧪 Test Execution Results
Command: [exact command run]
Duration: [time]
Total: [N] tests
✅ Passing: [N]
❌ Failing: [N]
⏭️ Skipped: [N]
[If all pass:]
All tests passing. Suite is healthy. ✓
[If failures:]
Failures requiring attention:
FAILURE:
- status: FAIL
- category: YOUR_CHANGE | OUTDATED_TEST | TEST_BUG | MISSING_DEP | ENVIRONMENT | CODE_BUG
- test: [test name]
- location: [file:line]
- error: [one-line error message]
- action: [what you will do to fix it]
FAILURE:
- status: FAIL
- category: [category]
- test: [test name]
- location: [file:line]
- error: [one-line error message]
- action: [what you will do to fix it]🧪 测试执行结果
命令: [运行的确切命令]
时长: [时间]
总计: [N]个测试
✅ 通过: [N]
❌ 失败: [N]
⏭️ 跳过: [N]
[如果全部通过:]
所有测试通过。套件状态健康。 ✓
[如果有失败:]
需要处理的失败:
FAILURE:
- status: FAIL
- category: YOUR_CHANGE | OUTDATED_TEST | TEST_BUG | MISSING_DEP | ENVIRONMENT | CODE_BUG
- test: [测试名称]
- location: [文件:行号]
- error: [单行错误信息]
- action: [你将采取的修复措施]
FAILURE:
- status: FAIL
- category: [类别]
- test: [测试名称]
- location: [文件:行号]
- error: [单行错误信息]
- action: [你将采取的修复措施]Deduplication algorithm:
1. Collect all FAILURE findings from all runners
2. Group by location (file:line overlap — within 5 lines)
3. For overlapping failures: keep the most specific category
4. Sort by category priority (CODE_BUG > YOUR_CHANGE > others)
5. Build summary table去重算法:
1. 收集所有运行器的FAILURE结果
2. 按位置分组(文件:行号重叠——5行以内)
3. 对于重叠的失败:保留最具体的类别
4. 按类别优先级排序(CODE_BUG > YOUR_CHANGE > 其他)
5. 构建汇总表格| Cause Category | What to Look For | Action |
|---|---|---|
| Your changes broke it | Test was passing in baseline, fails after your changes | Fix the implementation or update the test to match new correct behavior |
| Test is outdated | Test assertions don't match current intended behavior | Update the test to match correct behavior |
| Test has a bug | Test logic is flawed (wrong assertion, bad mock, race condition) | Fix the test |
| Missing dependency | Import errors, missing fixtures, setup failures | Add the missing piece |
| Environment issue | Port conflicts, file locks, timing issues | Fix the environment setup |
| Actual bug in code | Test correctly catches a real bug | Fix the production code |
| 原因类别 | 检查要点 | 行动 |
|---|---|---|
| 你的改动导致失败 | 基准线中测试通过,改动后失败 | 修复实现,或更新测试以匹配新的正确行为 |
| 测试已过时 | 测试断言与当前预期行为不匹配 | 更新测试以匹配正确行为 |
| 测试存在Bug | 测试逻辑有缺陷(错误断言、不良模拟、竞态条件) | 修复测试 |
| 缺少依赖 | 导入错误、缺少fixture、设置失败 | 添加缺失的部分 |
| 环境问题 | 端口冲突、文件锁、时序问题 | 修复环境设置 |
| 代码中存在实际Bug | 测试正确捕获了真实的Bug | 修复生产代码 |
⚠️ Escalation Required
Test: [test name] ([file:line])
Error: [exact error]
Root Cause: [what you found after investigation]
Why I can't fix it now: [specific technical blocker]
What's needed: [concrete next step]
Workaround: [if any temporary measure is possible]⚠️ 需要升级问题
测试: [测试名称] ([文件:行号])
错误: [确切错误信息]
根本原因: [调查后发现的问题]
当前无法修复的原因: [具体技术障碍]
需要的支持: [具体下一步]
临时解决方案: [如果有可行的临时措施]quality-runnerquality-runner🏁 Test Suite Report
Command: [exact command]
Duration: [time]
Results:
✅ [N] tests passing
⏭️ [N] tests skipped
❌ 0 tests failing
Quality:
Lint: ✅ passing | ❌ [N] issues fixed
Typecheck: ✅ passing | ❌ [N] errors fixed
Format: ✅ clean | ❌ [N] files formatted
[If fixes were made:]
Fixes Applied:
1. [file:line] — [what was fixed and why]
2. [file:line] — [what was fixed and why]
[If escalations exist:]
Escalations: [N] tests require external resolution
(see details above)
Suite Status: ✅ HEALTHY | ⚠️ NEEDS ATTENTION🏁 测试套件报告
命令: [确切命令]
时长: [时间]
结果:
✅ [N]个测试通过
⏭️ [N]个测试跳过
❌ 0个测试失败
质量检查:
代码检查: ✅ 通过 | ❌ 修复了[N]个问题
类型检查: ✅ 通过 | ❌ 修复了[N]个错误
格式检查: ✅ 符合规范 | ❌ 格式化了[N]个文件
[如果进行了修复:]
已应用的修复:
1. [文件:行号] —— [修复内容及原因]
2. [文件:行号] —— [修复内容及原因]
[如果有升级的问题:]
升级的问题: [N]个测试需要外部解决
(详情见上文)
套件状态: ✅ 健康 | ⚠️ 需要关注/start:implement/start:refactor/start:debug/start:review/start:implement/start:refactor/start:debug/start:review| Instead of... | Say... |
|---|---|
| "This test was already failing" | "This test is failing. Let me fix it." |
| "Not caused by my changes" | "The test suite needs to pass. Let me investigate." |
| "Pre-existing issue" | "Found a failing test. Fixing it now." |
| "This is outside the scope" | "I see a failing test. The suite needs to be green." |
| "The test might be flaky" | "Let me run it again and if it fails, fix the root cause." |
| "I'd recommend fixing this separately" | "I'm fixing this now." |
| "This appears to be a known issue" | "I'm making this a fixed issue." |
| 不要说... | 要说... |
|---|---|
| “这个测试本来就失败” | “这个测试失败了,我来修复它。” |
| “不是我的改动导致的” | “测试套件需要通过,我来调查。” |
| “原本就存在的问题” | “发现一个失败测试,现在修复它。” |
| “这超出了范围” | “我看到一个失败测试,套件需要恢复正常。” |
| “这个测试可能不稳定” | “我再运行一次,如果失败,就修复根本原因。” |
| “我建议分开修复这个问题” | “我现在就修复它。” |
| “这似乎是已知问题” | “我现在要把这个问题修复。” |