| name | review-test-code |
| description | Review test files for pattern compliance, code quality, correctness, coverage gaps, and best practices โ produces actionable feedback |
| argument-hint | <file-path-or-pattern> |
Test Code Review
When reviewing test code, systematically check every item below and report only actual issues found.
Review Process
Step 1: Read the File(s)
Read the target test file(s) completely. Also read related files:
- The conftest.py that provides fixtures for this test
- The operations class(es) used by the test
- The page objects/components used by the test (for E2E)
Step 2: Check Structure (all test types)
For every test function, verify:
Step 3: Check Type-Specific Patterns
For GraphQL Tests
For E2E Tests
For REST API Tests
Step 4: Check Code Quality
Step 5: Check Coverage
Severity Levels
Critical (must fix before merge)
- Missing cleanup / resource leak
- Hardcoded credentials or secrets
- Missing required marker
- Dict access on Pydantic model in GraphQL test
- Bare
assert for UI state in E2E test
time.sleep() in any code
Warning (should fix)
- Missing Allure decorators
- Raw
page.goto() instead of navigate()
- CSS/XPath selectors instead of
data-test-id
- Missing type hints
- Assertions after cleanup (should be before, cleanup in finally)
- Manual setup when markers would work
Suggestion (nice to have)
- Test could be split (does too many things)
- Missing
allure.step() for logical grouping
- Duplicate setup across tests (extract to fixture)
- Missing edge case coverage
Output Format
## Review: <file_path>
### Summary
<1-2 sentence assessment: what's good, what needs work>
### Critical Issues
- **[line N]** <issue description> โ **Fix:** <specific fix>
### Warnings
- **[line N]** <issue description> โ **Suggestion:** <specific improvement>
### Suggestions
- <improvement idea with rationale>
### Coverage Gaps
- <missing test scenario that should exist>
### Verdict
APPROVE | REQUEST_CHANGES | NEEDS_DISCUSSION
When reviewing multiple files, produce one section per file, then a final overall summary.