# Test Quality Review: {{REVIEW_SCOPE}}

**Review Date:** {{DATE}}
**Review Mode:** Full Review
**Files Analyzed:** {{FILE_COUNT}} files
**Smoke Tests (Python):** {{SMOKE_COUNT}} | **Integration Tests (Cypress):** {{INTEGRATION_COUNT}}

---

## Summary

| Category               | Status               | Issues               |
| ---------------------- | -------------------- | -------------------- |
| Data Lifecycle         | {{LIFECYCLE_STATUS}} | {{LIFECYCLE_ISSUES}} |
| Fixture Usage          | {{FIXTURE_STATUS}}   | {{FIXTURE_ISSUES}}   |
| Assertion Quality      | {{ASSERT_STATUS}}    | {{ASSERT_ISSUES}}    |
| Retry & Consistency    | {{RETRY_STATUS}}     | {{RETRY_ISSUES}}     |
| Environment Discipline | {{ENV_STATUS}}       | {{ENV_ISSUES}}       |
| Golden File Compliance | {{GOLDEN_STATUS}}    | {{GOLDEN_ISSUES}}    |
| Anti-Pattern Detection | {{ANTI_STATUS}}      | {{ANTI_ISSUES}}      |

**Legend:** ✅ Pass | ⚠️ Warnings | ❌ Issues Found

---

## Critical Issues (Blockers)

<!-- BLOCKER: Issues that MUST be fixed before merge -->

{{#IF NO_BLOCKERS}}
No blocker issues found.
{{/IF}}

{{#EACH BLOCKER}}

### {{INDEX}}. {{TITLE}}

- **Location:** `{{FILE_PATH}}:{{LINE}}`
- **Standard:** `standards/smoke-and-integration.md` - {{SECTION}}
- **Issue:** {{DESCRIPTION}}
- **Evidence:** {{CODE_SNIPPET}}
- **Fix:** {{RECOMMENDATION}}
  {{/EACH}}

---

## Important Issues (Warnings)

<!-- WARNING: Issues that should be addressed -->

{{#IF NO_WARNINGS}}
No warning issues found.
{{/IF}}

{{#EACH WARNING}}

### {{INDEX}}. {{TITLE}}

- **Location:** `{{FILE_PATH}}:{{LINE}}`
- **Issue:** {{DESCRIPTION}}
- **Recommendation:** {{RECOMMENDATION}}
  {{/EACH}}

---

## Suggestions (Nice to Have)

<!-- SUGGESTION: Optional improvements -->

{{#EACH SUGGESTION}}

- `{{FILE}}:{{LINE}}` -- {{DESCRIPTION}}
  {{/EACH}}

---

## Positive Observations

<!-- Good patterns found -->

{{#EACH POSITIVE}}

- {{DESCRIPTION}}
  {{/EACH}}

---

## Checklist Results

### Smoke Test Standards

- [{{SMOKE_LIFECYCLE}}] Uses `_ingest_cleanup_data_impl` data lifecycle pattern
- [{{SMOKE_FIXTURE}}] Module-scoped `ingest_cleanup_data` fixture with `autouse=True`
- [{{SMOKE_AUTH}}] Uses `auth_session` fixture (no inline credentials)
- [{{SMOKE_RETRY}}] Uses `@with_test_retry()` or `wait_for_writes_to_sync()` (no bare `time.sleep`)
- [{{SMOKE_GRAPHQL}}] Uses `execute_graphql()` with proper assertion checks
- [{{SMOKE_REST}}] Uses `restli_default_headers` for REST API calls
- [{{SMOKE_ENV}}] Uses `env_vars.py` registry (no direct `os.getenv`)
- [{{SMOKE_MARKERS}}] Appropriate pytest markers applied
- [{{SMOKE_NAMES}}] Descriptive test function names
- [{{SMOKE_CLEANUP}}] Cleanup of created entities in fixture teardown

### Integration Test Standards (Cypress)

- [{{CY_LAUNCHER}}] Launcher `integration_test.py` has proper data lifecycle (ingest + cleanup)
- [{{CY_BATCHING}}] Batching via `bin_pack_tasks` with `test_weights.json`
- [{{CY_ISOLATION}}] Specs use unique random IDs per `describe` block
- [{{CY_LOGIN}}] Each `it` block uses `cy.login()` or `beforeEach` auth
- [{{CY_SELECTORS}}] Uses `data-testid` selectors (not fragile CSS classes)
- [{{CY_ASSERTIONS}}] Non-trivial assertions (`cy.waitTextVisible`, `.should()`)
- [{{CY_CLEANUP}}] Tests that create entities clean up in `after()` blocks

---

## Quality Score

| Aspect                    | Score                    | Notes                 |
| ------------------------- | ------------------------ | --------------------- |
| Data Lifecycle Compliance | {{SCORE_LIFECYCLE}}/10   | {{NOTES_LIFECYCLE}}   |
| Assertion Quality         | {{SCORE_ASSERT}}/10      | {{NOTES_ASSERT}}      |
| Standards Compliance      | {{SCORE_STANDARDS}}/10   | {{NOTES_STANDARDS}}   |
| Anti-Pattern Avoidance    | {{SCORE_ANTIPATTERN}}/10 | {{NOTES_ANTIPATTERN}} |
| **Overall**               | **{{SCORE_OVERALL}}/10** |                       |

---

## Verdict

**{{VERDICT}}**

<!-- Options: APPROVED / NEEDS CHANGES / BLOCKED -->

### Required Actions Before Merge

{{#EACH REQUIRED_ACTION}}
{{INDEX}}. {{DESCRIPTION}}
{{/EACH}}

---

_Review generated by DataHub Test Review Skill_
