testing-test-writing
使用Pest框架为核心用户流程和关键路径编写专注的测试,在开发期间使用最少测试,在完成点进行战略性覆盖。在tests/Feature/或tests/Unit/目录中创建或编辑测试文件、编写具有描述性名称的Pest测试、测试关键用户工作流和业务逻辑、模拟外部依赖、实现快速单元测试、测试行为而非实现细节或决定在功能完成时需要什么测试覆盖范围时使用此技能。
📖 中文导读:使用Pest框架为核心用户流程和关键路径编写专注的测试,在开发期间使用最少测试,在完成点进行战略性覆盖。在tests/Feature/或tests/Unit/目录中创建或编辑测试文件、编写具有描述性名称的Pest测试、测试关键用户工作流和业务逻辑、模拟外部依赖、实现快速单元测试、测试行为而非实现细节或决定在功能完成时需要什么测试覆盖范围时使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Testing Test Writing description: Write focused tests for core user flows and critical paths using Pest framework, with minimal tests during development and strategic coverage at completion points. Use this skill when creating or editing test files in tests/Feature/ or tests/Unit/ directories, when writing Pest tests with descriptive names, when testing critical user workflows and business logic, when mocking external dependencies, when implementing fast unit tests, when testing behavior rather than implementation details, or when deciding what needs test coverage at feature completion.
Testing Test Writing
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle testing test writing.
When to use this skill
- When creating new test files in
tests/Feature/ortests/Unit/directories - When writing Pest tests with descriptive, clear test names
- When testing core user workflows and critical business paths
- When deciding what needs test coverage at feature completion points
- When mocking external dependencies (databases, APIs, file systems, services)
- When writing fast-executing unit tests
- When focusing tests on behavior and outcomes rather than implementation details
- When using Pest datasets to handle multiple test scenarios efficiently
- When testing validation rules, business logic, or API endpoints
- When implementing integration tests for critical features
- When running tests before committing code changes
- When skipping tests for non-critical utilities or edge cases (until explicitly required)
Instructions
For details, refer to the information provided in this file: testing test writing