Files
Bruno GaoandQwen-Coder 43d1229bd7 M1: Add complete documentation structure and contract specifications
- 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]>
2026-02-11 23:41:04 +08:00

652 B
Raw Permalink Blame History

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() { ... }