32 lines
1.6 KiB
Markdown
32 lines
1.6 KiB
Markdown
|
|
## Why
|
||
|
|
|
||
|
|
The RacePlanner project currently lacks a comprehensive test suite, making it difficult to ensure code quality and prevent regressions. We need to establish testing infrastructure for both the .NET backend and Next.js frontend to enable confident development and deployments.
|
||
|
|
|
||
|
|
## What Changes
|
||
|
|
|
||
|
|
- **Backend Unit Tests**: Create a .NET test project with xUnit for unit testing Controllers, Services, and Data layer
|
||
|
|
- **Frontend Unit Tests**: Set up Jest/React Testing Library for React components and hooks
|
||
|
|
- **Integration Tests**: Create end-to-end integration tests that verify frontend-backend communication via API calls
|
||
|
|
- **Test Automation**: Configure test runners with npm scripts for automated execution
|
||
|
|
- **CI/CD Integration**: Add GitHub Actions workflow to run tests on pull requests
|
||
|
|
|
||
|
|
## Capabilities
|
||
|
|
|
||
|
|
### New Capabilities
|
||
|
|
|
||
|
|
- `backend-unit-tests`: .NET xUnit test project for API Controllers, Services, and Data layer
|
||
|
|
- `frontend-unit-tests`: Jest/React Testing Library setup for Next.js components and hooks
|
||
|
|
- `integration-tests`: End-to-end tests verifying API communication between frontend and backend
|
||
|
|
- `test-automation`: Automated test runners and CI/CD integration
|
||
|
|
|
||
|
|
### Modified Capabilities
|
||
|
|
|
||
|
|
- None (this change adds testing infrastructure without modifying existing functionality)
|
||
|
|
|
||
|
|
## Impact
|
||
|
|
|
||
|
|
- **Backend**: New `backend.Tests/` project directory added, new test dependencies in `.csproj`
|
||
|
|
- **Frontend**: Additional dev dependencies for Jest and React Testing Library
|
||
|
|
- **CI/CD**: New GitHub Actions workflow in `.github/workflows/` for automated testing
|
||
|
|
- **Build Process**: New npm scripts (`test`, `test:backend`, `test:frontend`, `test:integration`) added
|