원클릭으로
testing
Write, run, and interpret tests — assess coverage and quality
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write, run, and interpret tests — assess coverage and quality
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Review pull requests for code quality, security, and correctness
Review pull requests for code quality, security, and correctness
End-to-end shipping workflow — tests, PR creation, review request. Unified pr-create + pr-complete.
Periodic cross-agent learning consolidation — review what worked, what didn't, propagate insights
Break down complex problems through structured analytical frameworks
Persist and recall context across sessions — critical for continuity
| name | testing |
| version | 1.0.0 |
| description | Write, run, and interpret tests — assess coverage and quality |
| uses | ["analysis/research"] |
| requires | {"tools":[],"env":[]} |
| security | {"risk_level":"write","capabilities":["file:write","command:execute"],"requires_approval":false} |
Write, run, and interpret tests for any codebase. This skill covers the full testing lifecycle — determining what to test, writing effective tests, running them, interpreting results, and assessing coverage quality.
This is an agent-handled skill (handler: type: agent). When test is invoked, you (the agent) apply the methodology below using your reasoning capabilities. There is no backing code — you follow these instructions directly. The tool schema in tool.yaml defines the external contract; this document guides how you fulfill it.
Before writing or evaluating tests, understand:
| Strategy | When to Use | Characteristics |
|---|---|---|
| Unit tests | Individual functions/methods | Fast, isolated, mock dependencies |
| Integration tests | Component interactions | Slower, real dependencies, verify wiring |
| End-to-end tests | Full workflows | Slowest, full stack, verify user scenarios |
| Property-based tests | Input-dependent logic | Generated inputs, verify invariants |
| Regression tests | After bug fixes | Reproduce the bug, verify the fix |
Default: Start with unit tests. Add integration tests for critical paths. E2E tests for key user workflows.
For each function/behavior, design cases covering:
Happy path: Normal inputs, expected behavior
Edge cases: Boundary conditions
Error cases: Things that should fail
State transitions: If stateful
Follow the Arrange-Act-Assert pattern:
Arrange: Set up preconditions and inputs
Act: Execute the code under test
Assert: Verify the expected outcome
Naming convention: test_<what>_<condition>_<expected>
test_login_valid_credentials_returns_tokentest_login_expired_password_raises_auth_errortest_parse_empty_input_returns_empty_listTest independence: Each test must be self-contained. No test should depend on another test's output or side effects.
Execute the test suite using the project's test runner:
For failures, diagnose:
Evaluate test quality beyond just line coverage:
| Metric | What It Measures | Target |
|---|---|---|
| Line coverage | Lines executed by tests | 80%+ for critical code |
| Branch coverage | Decision branches taken | Every if/else, every case |
| Mutation coverage | Tests that catch code changes | Tests fail when code is wrong |
| Edge case coverage | Boundary conditions tested | Every edge case from step 3 |
Coverage is necessary but not sufficient: 100% line coverage with no assertions is worthless. Focus on meaningful assertions.
## Testing: [Target]
### Strategy
- Approach: [unit/integration/e2e]
- Framework: [detected framework]
- Files: [test file paths]
### Test Cases
| # | Test | Category | Status |
|---|------|----------|--------|
| 1 | [name] | [happy/edge/error] | [pass/fail/skip] |
### Results
- Passed: [N]
- Failed: [N]
- Skipped: [N]
- Duration: [time]
### Failures (if any)
| Test | Error | Diagnosis |
|------|-------|-----------|
| [name] | [error summary] | [test bug / code bug / setup issue] |
### Coverage Assessment
- Line coverage: [%]
- Missing coverage: [list of uncovered areas]
- Quality: [meaningful assertions / coverage padding / gaps]
### Recommendations
- [what to add/fix/improve]
Testing is complete when: