15-testing-strategy.md 774 B

15. Testing Strategy

定义全栈应用程序的全面测试方法:

15.1 测试金字塔

        E2E Tests
       /          \\
Integration Tests
     /                \\
Frontend Unit  Backend Unit

15.2 测试组织

前端测试:

apps/admin/tests/
├── unit/          # 单元测试
├── components/    # 组件测试
├── hooks/         # Hook测试
└── __mocks__/     # 测试mock

后端测试:

apps/api/tests/
├── unit/          # 单元测试
├── integration/   # 集成测试
└── __mocks__/     # 测试mock

E2E测试:

tests/e2e/
├── auth/          # 认证流程测试
├── users/         # 用户管理测试
└── support/       # 测试支持