- Add comprehensive docs/ directory with standardized structure - Include architecture specification and contract documents - Add prompt templates for development workflows - Establish M1 deliverables as frozen specifications Co-authored-by: Qwen-Coder <[email protected]>
652 B
652 B
title, owner, status, last_reviewed, review_cycle
| title | owner | status | last_reviewed | review_cycle |
|---|---|---|---|---|
| 测试策略 | team-java21-template | published | 2026-02-11 | 90d |
测试策略
单元测试
- 覆盖率 ≥ 70%
- UseCase 必须有测试
- Domain 层必须有充分的单元测试
架构测试
ArchUnit 强制:
- domain 不依赖 Spring
- Controller 不直接调用 Repository
- 依赖方向符合 Clean Architecture
集成测试
使用 Testcontainers:
- PostgreSQL
- Redis
测试命名约定
// 单元测试
@Test
void shouldCalculateTotalAmountWhenValidInputs() { ... }
// 集成测试
@Test
void shouldReturnUserDetailsWhenValidCustomerIdProvided() { ... }