Problem
Minimal test coverage: ~15% estimated
Current state:
- Backend: 726 lines of tests for ~5800 lines of code
- Frontend: No test files found
- Missing: Auth, proposals, engine, services
Target Coverage
- Backend: 70%+ line coverage
- Frontend: 60%+ line coverage
- Critical paths: 90%+ coverage
Implementation Plan
1. Setup Test Infrastructure
# Backend
pip install pytest-cov pytest-asyncio
# Frontend
npm install --save-dev @testing-library/react vitest @testing-library/jest-dom
2. Priority Test Areas (Backend)
3. Priority Test Areas (Frontend)
4. Configure Coverage
# pytest.ini
[pytest]
testpaths = tests
addopts =
--cov=app
--cov-report=html
--cov-report=term-missing
--cov-fail-under=70
5. CI Integration
Add to .github/workflows/ci.yml:
- name: Run tests with coverage
run: |
pytest --cov=app --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
Estimated Time
15-20 hours (comprehensive coverage)
References
- COMPREHENSIVE_TODO.md: TEST-001
Problem
Minimal test coverage: ~15% estimated
Current state:
Target Coverage
Implementation Plan
1. Setup Test Infrastructure
2. Priority Test Areas (Backend)
tests/api/test_auth.py- Authentication flowtests/api/test_engine.py- Roadmap generationtests/api/test_proposals.py- Proposal lifecycletests/services/test_graph_repo.py- Graph operationstests/workers/test_commit.py- Transaction handling3. Priority Test Areas (Frontend)
tests/pages/ExplorePage.test.tsx- Graph visualizationtests/components/AIChat.test.tsx- Chat functionalitytests/api.test.ts- API clienttests/store/exploreSlice.test.ts- Redux state4. Configure Coverage
5. CI Integration
Add to
.github/workflows/ci.yml:Estimated Time
15-20 hours (comprehensive coverage)
References