Browse Source

📝 docs(testing): update testing strategy documentation

- update source references from tech-stack.md to testing-strategy.md
- add detailed source links for each testing component
- add new testing requirements: naming conventions, AAA pattern, async testing
- update change log with version 1.2 entry for documentation updates
yourname 3 tháng trước cách đây
mục cha
commit
52b3e897aa
1 tập tin đã thay đổi với 13 bổ sung8 xóa
  1. 13 8
      docs/stories/1.1.sdk-core-architecture.md

+ 13 - 8
docs/stories/1.1.sdk-core-architecture.md

@@ -114,22 +114,26 @@ Draft
 
 ## Testing
 
-### 测试策略 [Source: architecture/tech-stack.md#测试工具]
+### 测试策略 [Source: architecture/testing-strategy.md]
 
-- **测试框架**: Vitest 3.2.4 (已集成)
-- **测试库**: Testing Library 16.3.0
-- **E2E测试**: Playwright 1.55.0
+- **测试框架**: Vitest 3.2.4 (已集成) [Source: architecture/testing-strategy.md#单元测试]
+- **测试库**: Testing Library 16.3.0 [Source: architecture/testing-strategy.md#单元测试]
+- **E2E测试**: Playwright 1.55.0 [Source: architecture/testing-strategy.md#端到端测试]
 - **测试位置**: `packages/stt-sdk-core/tests/`目录
-- **单元测试**: 针对核心类和工具函数
-- **集成测试**: 验证与现有管理器的集成
+- **单元测试**: 针对核心类和工具函数 [Source: architecture/testing-strategy.md#单元测试]
+- **集成测试**: 验证与现有管理器的集成 [Source: architecture/testing-strategy.md#集成测试]
+- **测试覆盖率目标**: 核心功能80%以上 [Source: architecture/testing-strategy.md#测试覆盖率目标]
 
-### 测试要求
+### 测试要求 [Source: architecture/testing-strategy.md]
 
 - 所有核心类必须有单元测试(使用Vitest + Testing Library)
 - 事件系统和错误处理需要测试覆盖
 - 类型定义需要通过TypeScript编译检查
 - 现有功能回归测试必须通过(使用Playwright E2E测试)
-- 测试覆盖率目标:核心功能80%以上
+- 测试覆盖率目标:核心功能80%以上 [Source: architecture/testing-strategy.md#测试覆盖率目标]
+- 测试命名规范:使用描述性测试名称 [Source: architecture/testing-strategy.md#测试命名规范]
+- 测试结构:遵循AAA模式(Arrange-Act-Assert) [Source: architecture/testing-strategy.md#测试结构]
+- 异步测试处理:正确使用async/await [Source: architecture/testing-strategy.md#异步测试处理]
 
 ## Change Log
 
@@ -137,6 +141,7 @@ Draft
 | ---------- | ------- | ------------------------------------------------------------------------- | ----------- |
 | 2025-09-25 | 1.0     | 初始故事创建                                                              | Claude Code |
 | 2025-09-25 | 1.1     | 更新测试框架信息:Vitest 3.2.4, Testing Library 16.3.0, Playwright 1.55.0 | Claude Code |
+| 2025-09-25 | 1.2     | 更新测试策略引用:使用architecture/testing-strategy.md文档                | Claude Code |
 
 ## Dev Agent Record