Add test coverage checklist, report template, and stack matrix for ecommerce project
- Created a test coverage checklist to ensure comprehensive testing of backend and frontend components. - Added a test report template to standardize reporting on test execution results and gaps. - Introduced a test stack matrix to guide the selection of testing tools and frameworks for backend and frontend. - Established a skill for repairing failing tests, including a failure triage checklist and a test repair template. - Documented recommended MCP stack for ecommerce development with FastAPI and React/Next.js. - Developed a detailed README outlining the project structure, agent capabilities, and recommended workflows. - Compiled a comprehensive workflow guide detailing step-by-step commands for project setup, testing, and SEO implementation.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: ecommerce-test-repair
|
||||
description: 'Fix failing backend and frontend tests, then rerun them. Use for investigating test failures, repairing code or tests, and repeating the loop until suites pass or blockers are documented.'
|
||||
argument-hint: 'Describe whether to fix all current failures or only backend or frontend test failures'
|
||||
---
|
||||
# Ecommerce Test Repair
|
||||
|
||||
## When to use
|
||||
- After the test-implementation step finds failures.
|
||||
- When backend or frontend automated tests are red.
|
||||
- When regressions appear after refactors, SEO changes, or feature work.
|
||||
|
||||
## Goal
|
||||
- Analyze failing tests honestly.
|
||||
- Fix the underlying code or the tests, whichever is actually wrong.
|
||||
- Rerun the affected suites.
|
||||
- Produce or update .ai/TEST-REPAIR.md with failure analysis, fixes applied, rerun results, and remaining blockers.
|
||||
|
||||
## Required workflow
|
||||
1. Read the latest .ai/TEST-REPORT.md if it exists.
|
||||
2. Inspect actual failing output rather than guessing.
|
||||
3. Before serious backend or frontend edits, create a timestamped snapshot under .backup/ and keep that folder append-only.
|
||||
4. Classify failures using [failure triage checklist](./assets/failure-triage-checklist.md).
|
||||
5. Fix root causes instead of patching symptoms when possible.
|
||||
6. Rerun the affected tests.
|
||||
7. Repeat until the suite is green or real blockers remain.
|
||||
8. Write or update .ai/TEST-REPAIR.md using [test repair template](./assets/test-repair-template.md).
|
||||
|
||||
## Constraints
|
||||
- Do not weaken tests just to make them pass.
|
||||
- Do not rewrite assertions into meaninglessness.
|
||||
- Do not ignore failing tests without documenting the blocker.
|
||||
|
||||
## Outputs
|
||||
- Code or test fixes.
|
||||
- Rerun results.
|
||||
- .ai/TEST-REPAIR.md.
|
||||
|
||||
## References
|
||||
- [failure triage checklist](./assets/failure-triage-checklist.md)
|
||||
- [test repair template](./assets/test-repair-template.md)
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Failure Triage Checklist
|
||||
|
||||
## First classify the problem
|
||||
- Real product bug.
|
||||
- Broken or outdated test.
|
||||
- Environment or fixture problem.
|
||||
- Flaky timing or async issue.
|
||||
- Wrong assumptions after a refactor.
|
||||
|
||||
## Backend-specific checks
|
||||
- Contract mismatch.
|
||||
- Validation error changes.
|
||||
- Permissions or auth regression.
|
||||
- Test data or fixture drift.
|
||||
|
||||
## Frontend-specific checks
|
||||
- UI behavior changed intentionally or unintentionally.
|
||||
- Query selectors too brittle.
|
||||
- Async rendering not awaited correctly.
|
||||
- Mock data drift.
|
||||
|
||||
## Repair rule
|
||||
- Fix the real source of truth issue first.
|
||||
- Only change tests when the implementation is correct and the test is outdated or wrong.
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# TEST-REPAIR.md Template
|
||||
|
||||
## 1. Initial Failure State
|
||||
- Failing suites
|
||||
- Failing commands
|
||||
- Main error categories
|
||||
|
||||
## 2. Root Cause Analysis
|
||||
- Backend causes
|
||||
- Frontend causes
|
||||
- Environment causes if any
|
||||
|
||||
## 3. Fixes Applied
|
||||
- Code fixes
|
||||
- Test fixes
|
||||
- Config or fixture fixes
|
||||
|
||||
## 4. Rerun Results
|
||||
- Commands rerun
|
||||
- Passing suites
|
||||
- Remaining failures
|
||||
|
||||
## 5. Blockers
|
||||
- Anything still preventing green status
|
||||
|
||||
## 6. Recommended Next Step
|
||||
- Whether to continue fixing
|
||||
- Whether to adjust architecture, fixtures, or test tooling
|
||||
Reference in New Issue
Block a user