Added test cases
What does this MR do and why?
This MR adds automated test cases for the GitLab Compliance Checker backend to validate productivity, compliance checks, and GitLab API data retrieval functionality. The tests ensure that productivity calculations, commit analysis, merge request tracking, and issue tracking work correctly. This improves backend reliability, helps detect errors early, and prevents regressions in future development.
References
- GitLab Compliance Checker backend modules
- Productivity utilities in
gitlab_utils/productivity_utils.py - GitLab API integration using python-gitlab library
- Backend test suite implemented using pytest
Screenshots or screen recordings
| Before | After |
|---|---|
| No automated test validation for backend productivity and compliance features | Automated pytest test cases added and all tests passing successfully |
How to set up and validate locally
-
Pull this branch to your local machine
-
Activate the virtual environment: source venv/bin/activate
-
Install required dependencies (if not already installed): pip install -r requirements.txt
-
Run the test cases: venv/bin/python -m pytest -q tests
-
Verify that all tests pass successfully and display output similar to:
............................................. [100%]
- Confirm there are no failures or errors during test execution
MR acceptance checklist
-
Test cases added for backend productivity and compliance functionality -
All test cases pass successfully -
No breaking changes introduced -
Code follows project standards and structure -
Backend functionality verified through automated testing