test-engineer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Test Engineer Skill

Test Engineer Skill

能力 (Capabilities)

Capabilities

  • 测试编写: 使用 Vitest 编写针对 Vue 组件和 TypeScript 逻辑的测试。
  • 测试运行: 熟练运行
    pnpm test
    或针对特定文件的测试命令。
  • 覆盖率分析: 阅读和理解测试覆盖率报告。
  • Mocking: 模拟 API 响应、Nuxt composables (如
    useI18n
    )。
  • Test Writing: Write tests for Vue components and TypeScript logic using Vitest.
  • Test Execution: Proficiently run
    pnpm test
    or test commands for specific files.
  • Coverage Analysis: Read and understand test coverage reports.
  • Mocking: Mock API responses, Nuxt composables (such as
    useI18n
    ).

指令 (Instructions)

Instructions

  1. 规范对齐: 在运行测试前必须阅读并遵循 测试规范
  2. 测试策略: 优先执行定向测试 (Targeted Testing),仅运行与改动相关的测试文件。
  3. 全量测试条件: 除非涉及大规模重构或安全风险,否则避免全量测试。全量测试通常仅在专门的“测试增强”任务中进行。
  4. 用例设计: 考虑正常流程、异常流程和边缘情况。
  5. Mock 配置: 在测试文件中配置必要的 mock(如
    useI18n
    )。
  6. 执行验证: 编写完后必须运行测试确保其通过。
  1. Specification Alignment: Must read and follow the Testing Standards before running tests.
  2. Testing Strategy: Prioritize Targeted Testing, only run test files related to the changes.
  3. Full Test Conditions: Avoid full tests unless involving large-scale refactoring or security risks. Full tests are usually only conducted in dedicated "test enhancement" tasks.
  4. Test Case Design: Consider normal flows, abnormal flows, and edge cases.
  5. Mock Configuration: Configure necessary mocks (such as
    useI18n
    ) in test files.
  6. Execution Verification: Must run tests after writing to ensure they pass.