Test Strategy: Unified Task Reports by Type
Overview
This feature implements a unified reporting center. Testing is split between Backend (Aggregation/Normalization) and Frontend (Unified UX/Type Profiles).
Tiers & Fixtures
- CRITICAL Modules:
ReportsAggregationModule,ReportNormalizer,ReportsApiContract,UnifiedReportsPage. - TEST_DATA: Uses
mixed_task_reportsandunknown_type_partial_payloadfixtures defined in.ai/standards/semantics.md(materialized inbackend/tests/fixtures/reports/fixtures_reports.jsonandfrontend/src/lib/components/reports/__tests__/fixtures/reports.fixtures.js).
Test Suites
Backend
- Contract Tests:
backend/src/api/routes/__tests__/test_reports_api.py(Pagination, Filters). - Normalizer Tests:
backend/src/services/reports/__tests__/test_report_normalizer.py(Fallback logic). - Detail Tests:
backend/src/api/routes/__tests__/test_reports_detail_api.py. - Conformance:
backend/src/api/routes/__tests__/test_reports_openapi_conformance.py.
Frontend
- UX Contract Tests:
frontend/src/lib/components/reports/__tests__/report_card.ux.test.jsfrontend/src/lib/components/reports/__tests__/report_detail.ux.test.js
- Integration Tests:
frontend/src/lib/components/reports/__tests__/reports_page.integration.test.jsfrontend/src/lib/components/reports/__tests__/report_detail.integration.test.js
- Unit Tests:
frontend/src/lib/components/reports/__tests__/report_type_profiles.test.js
- Performance:
frontend/src/lib/components/reports/__tests__/reports_filter_performance.test.js
Execution
- Backend:
cd backend && .venv/bin/python3 -m pytest - Frontend:
cd frontend && npm test