🧪
简介
来自 T3 社区来源的纯文档型 Skill 模板,零代码执行风险,适合作为开发基础框架或占位符使用。
原始描述
|
技能正文
name: test description: Write, update, and fix tests in S3Mock. Use when asked to add test coverage, create test cases, fix failing tests, or verify test correctness. Covers unit tests (*Test.kt in server/), controller slice tests (@WebMvcTest), and integration tests (*IT.kt in integration-tests/ against a live Docker container).
Test Skill
Entry Criteria
Use to add/update unit tests (*Test.kt) or integration tests (*IT.kt), fix failing tests, or verify test coverage.
Before Starting
- Read root
AGENTS.md, the relevant moduleAGENTS.md, and docs/TESTING.md for base classes, conventions, and running commands. - If existing tests have structural problems (poor naming, shared state, weak assertions), invoke the
refactorskill first.
Execution Steps
- Select the base class per
docs/TESTING.md§ Unit Tests, orS3TestBaseper integration-tests/AGENTS.md for integration tests. - Write tests following
docs/TESTING.mdconventions (naming, structure, assertions, independence). - Cover both success and failure/error paths.
- Update the copyright year in every modified file (
INVARIANTS.md). - Invoke the
lintskill. - Run
make test(unit) ormake integration-tests(integration) to verify locally.
Completion Criteria
- All new/changed code paths covered, including failure cases
- Correct base class and conventions used (per
docs/TESTING.md) - Tests pass locally
- Copyright year updated in every modified file
- Lint gates pass (via
lintskill)
Resources
AGENTS.md,INVARIANTS.md- Relevant module
AGENTS.md(server/AGENTS.mdorintegration-tests/AGENTS.md) docs/TESTING.md,docs/KOTLIN.md