Loading...
Loading...
Compare original and translation side by side
┌─────────────┐ ┌───────────┐
│ diagnostics │ ──▶ │ arbiter │ ─┐
│ (type check)│ │ (unit) │ │
└─────────────┘ └───────────┘ │
├──▶ ┌─────────┐
┌───────────┐ │ │ atlas │
│ arbiter │ ─┘ │ (e2e) │
│ (integ) │ └─────────┘
└───────────┘
Pre-flight Parallel Sequential
(~1 second) fast tests slow tests┌─────────────┐ ┌───────────┐
│ diagnostics │ ──▶ │ arbiter │ ─┐
│ (type check)│ │ (unit) │ │
└─────────────┘ └───────────┘ │
├──▶ ┌─────────┐
┌───────────┐ │ │ atlas │
│ arbiter │ ─┘ │ (e2e) │
│ (integ) │ └─────────┘
预检(约1秒) 并行快速测试 串行慢测试| # | Agent | Role | Execution |
|---|---|---|---|
| 1 | arbiter | Unit tests, type checks, linting | Parallel |
| 1 | arbiter | Integration tests | Parallel |
| 2 | atlas | E2E/acceptance tests | After 1 passes |
| 序号 | Agent | 职责 | 执行方式 |
|---|---|---|---|
| 1 | arbiter | 单元测试、类型检查、代码扫描 | 并行 |
| 1 | arbiter | 集成测试 | 并行 |
| 2 | atlas | E2E/验收测试 | 待步骤1通过后执行 |
tldr diagnostics . --project --format text 2>/dev/null | grep "^E " | head -10tldr diagnostics . --project --format text 2>/dev/null | grep "^E " | head -10tldr change-impact --sessiontldr change-impact --session
This returns which tests to run based on what changed. Skip this for small projects or when you want full coverage.
该命令会根据变更内容返回需要运行的测试。小型项目或需要全量覆盖时可跳过此步骤。undefinedundefinedundefinedundefinedTask(
subagent_type="atlas",
prompt="""
Run E2E tests for: [SCOPE]
Include:
- End-to-end flows
- Acceptance tests
- UI tests if applicable
Report: Pass/fail count, screenshots on failure
"""
)Task(
subagent_type="atlas",
prompt="""
运行以下范围的E2E测试:[SCOPE]
包含:
- 端到端流程
- 验收测试
- 适用时包含UI测试
报告:通过/失败数量、失败时截图
"""
)User: /test
→ All unit + integration + E2E tests用户:/test
→ 所有单元测试+集成测试+E2E测试User: /test authentication
→ Only auth-related tests用户:/test authentication
→ 仅运行与认证相关的测试User: /test --quick
→ Only unit tests (skip integration and E2E)用户:/test --quick
→ 仅运行单元测试(跳过集成测试和E2E测试)User: /test the new payment feature
Claude: Starting /test workflow for payment feature...
Phase 0: Pre-flight diagnostics...
$ tldr diagnostics . --project --format text | grep "^E "
(no type errors found)
Phase 1: Running parallel tests...
┌─────────────────────────────────────────┐
│ arbiter: Running unit tests... │
│ arbiter: Running integration tests... │
└─────────────────────────────────────────┘
arbiter: ✅ 45/45 unit tests passing
arbiter: ✅ 12/12 integration tests passing
Phase 2: Running E2E tests...
atlas: ✅ 8/8 E2E tests passing
Test Summary:
┌─────────────┬─────────┬────────┐
│ Type │ Passed │ Failed │
├─────────────┼─────────┼────────┤
│ Unit │ 45 │ 0 │
│ Integration │ 12 │ 0 │
│ E2E │ 8 │ 0 │
├─────────────┼─────────┼────────┤
│ TOTAL │ 65 │ 0 │
└─────────────┴─────────┴────────┘
All tests passing! ✅用户:/test the new payment feature
Claude:启动支付功能的/test工作流...
阶段0:执行预检诊断...
$ tldr diagnostics . --project --format text | grep "^E "
(未发现类型错误)
阶段1:运行并行测试...
┌─────────────────────────────────────────┐
│ arbiter:正在运行单元测试... │
│ arbiter:正在运行集成测试... │
└─────────────────────────────────────────┘
arbiter:✅ 45/45 单元测试通过
arbiter:✅ 12/12 集成测试通过
阶段2:运行E2E测试...
atlas:✅ 8/8 E2E测试通过
测试汇总:
┌─────────────┬─────────┬────────┐
│ 类型 │ 通过数 │ 失败数 │
├─────────────┼─────────┼────────┤
│ 单元测试 │ 45 │ 0 │
│ 集成测试 │ 12 │ 0 │
│ E2E测试 │ 8 │ 0 │
├─────────────┼─────────┼────────┤
│ 总计 │ 65 │ 0 │
└─────────────┴─────────┴────────┘
所有测试通过!✅User: /test
Claude: Starting /test workflow...
Phase 0: Pre-flight diagnostics...
$ tldr diagnostics . --project --format text | grep "^E "
E src/payment.py:45:12: Argument of type 'str' not assignable to 'int'
E src/refund.py:23:8: Return type 'None' not assignable to 'float'
Found 2 type errors. Fixing before running tests...
[Claude fixes the type errors]
Re-running diagnostics... clean.
Phase 1: Running parallel tests...用户:/test
Claude:启动/test工作流...
阶段0:执行预检诊断...
$ tldr diagnostics . --project --format text | grep "^E "
E src/payment.py:45:12: 参数类型'str'无法赋值给'int'
E src/refund.py:23:8: 返回类型'None'无法赋值给'float'
发现2处类型错误,先修复再运行测试...
[Claude修复类型错误]
重新执行诊断... 检查通过。
阶段1:运行并行测试...arbiter: ❌ 43/45 tests passing
2 failures:
- test_payment_validation: expected 'invalid' got 'valid'
- test_refund_calculation: off by $0.01
Stopping workflow. Fix failures before running E2E tests.arbiter:❌ 43/45 测试通过
2处失败:
- test_payment_validation:预期'invalid',实际得到'valid'
- test_refund_calculation:差值为$0.01
终止工作流。修复失败后再运行E2E测试。--quick--no-e2e--coverage--watch--quick--no-e2e--coverage--watch