feat: update M2/M3 milestones to include testing infrastructure

M2 (Backend):
- Add tests/ folder with pytest test files
- Add pytest.ini for test configuration and coverage
- Update scoring to require unit tests (Score 4+)

M3 (Frontend):
- Add tests/ folder with Vitest component unit tests
- Add playwright/e2e/ folder with E2E Playwright tests
- Add @playwright/test dependency and configuration
- Update scoring to require both unit and E2E tests (Score 5)

README.md updated with all milestone links and test requirements
This commit is contained in:
Daniel Samson committed 2026-10-29 15:54:10 +00:00
1 parent d66fe178c3
commit 85490bc0a2
5 files changed
+216 -65

No files matched your search

+21 -10
View File
@@ -4,19 +4,19 @@
| Score | Criteria |
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0 | Agent failed to implement acceptance criteria:<br>- No FastAPI application created<br>- Database session not configured<br>- Models missing or broken<br>- No endpoints implemented<br>- Missing required files (.gitignore, Dockerfile) |
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic FastAPI app runs but incomplete structure<br>- Backend folder missing key components<br>- Only one endpoint working<br>- Some models incomplete |
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- FastAPI application in backend/main.py<br>- SQLAlchemy configured with SQLite in Docker volume<br>- All three models (Article, Author, Category) created<br>- Both /health and /api/v1/version endpoints working<br>- requirements.txt present with dependencies<br>- .gitignore file included |
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes Pydantic schemas for all models with validation<br>- Schemas properly integrated in API responses<br>- Dockerfile creates runnable container image |
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes passing unit tests for:<br>- Model CRUD operations<br>- Database session management<br>- Schema validation<br>- Endpoint response formats |
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- End-to-end integration test demonstrating full Docker workflow (build → run → query)<br>- Complete docker-compose.yml with backend service and persistent storage<br>- Performance benchmarks showing acceptable latency under load |
| 0 | Agent failed to implement acceptance criteria:<br>- No FastAPI application created<br>- Database session not configured<br>- Models missing or broken<br>- No endpoints implemented<br>- Missing required files (.gitignore, Dockerfile, tests) |
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic FastAPI app runs but incomplete structure<br>- Backend folder missing key components<br>- Only one endpoint working<br>- Some models incomplete<br>- Tests present but broken |
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- FastAPI application in backend/main.py<br>- SQLAlchemy configured with SQLite in Docker volume<br>- All three models (Article, Author, Category) created<br>- Both /health and /api/v1/version endpoints working<br>- requirements.txt present with dependencies<br>- .gitignore file included<br>- pytest.ini configured for test discovery |
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes Pydantic schemas for all models with validation<br>- Schemas properly integrated in API responses<br>- Dockerfile creates runnable container image<br>- Unit tests exist in backend/tests/ folder |
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes comprehensive unit tests covering:<br>- Health and version endpoints (test_health.py, test_version.py)<br>- Model creation and database operations (test_models.py)<br>- pytest fixtures for database setup/teardown |
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- Unit tests achieve >=70% code coverage on core modules<br>- Integration tests testing full request/response flow<br>- Performance tests measuring endpoint response times |
## Scoring Breakdown by Criterion
### Application Structure (Max 2 points)
- **0 pts**: No FastAPI application or main.py missing<br>- Backend folder not created properly
- **1 pt**: main.py exists but incomplete structure (missing core/, db/, etc.)<br>- Inconsistent folder organization
- **2 pts**: Complete directory structure with all expected folders and files (api/, core/, db/, models/, schemas/)<br>- Proper __init__.py files in each package
- **2 pts**: Complete directory structure with all expected folders and files (api/, core/, db/, models/, schemas/)
### Database Setup (Max 2 points)
- **0 pts**: No SQLAlchemy configuration or session setup<br>- Database connection fails
@@ -34,11 +34,22 @@
- **1 pt**: Health endpoint works but version endpoint broken<br>- Only one path defined
- **2 pts**: Both /health and /api/v1/version working with correct JSON responses<br>- Proper status codes
### Documentation (Max 3 points)
### Documentation (Max 2 points)
- **0 pts**: No README.md or incomplete<br>- No API documentation
- **1 pt**: README exists with basic info only<br>- Missing endpoint examples
- **2 pts**: Comprehensive README with full API documentation, examples, and usage instructions
- **3 pts**: README includes setup guide, configuration notes, and troubleshooting tips
### Test Infrastructure (Max 3 points)
- **0 pts**: No pytest configuration<br>- requirements.txt missing test dependencies
- **1 pt**: requirements.txt has pytest but no pytest.ini or conftest.py<br>- Tests not discoverable
- **2 pts**: pytest.ini configured, tests folder created with structure<br>- conftest.py exists for fixtures
- **3 pts**: All test files present (test_health.py, test_version.py, test_models.py) covering core functionality
### Test Coverage (Max 3 points)
- **0 pts**: Tests missing or not runnable<br>- pytest fails to discover tests
- **1 pt**: Tests exist but fail or have syntax errors<br>- No actual coverage achieved
- **2 pts**: Tests pass successfully on all endpoints and models<br>- Coverage >50%
- **3 pts**: All tests pass with >=70% code coverage, includes integration scenarios
### Docker Support (Max 2 points)
- **0 pts**: No Dockerfile or .dockerignore<br>- Cannot containerize application
@@ -51,7 +62,7 @@
- **2 pts**: Proper exception handling, standardized responses, follows FastAPI/SQLAlchemy conventions
- **3 pts**: Clean separation of concerns, type hints, docstrings for all functions
## Total Possible Score: 19 points
## Total Possible Score: 25 points
## Evaluation Notes
- Partial credit given for incomplete but working implementations (Score 1)