-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Quality assurance is critical for TopicsFlow. This guide covers how to run the various test suites available in the project.
The backend uses pytest for unit and integration testing.
Ensure you have the test dependencies installed:
pip install -r backend/requirements.txtWindows:
.\run_tests.batLinux/Mac:
./run_tests.sh-
Unit Tests: Test individual functions and models (e.g.,
test_user.py). - Integration Tests: Test API endpoints and database interactions.
-
Connection Tests:
-
backend/test_cosmos_connection.py: Verifies MongoDB/CosmosDB connectivity. -
backend/scripts/test_redis_connection.py: Verifies Redis connectivity.
-
A Postman collection is included in the root directory: TopicsFlow_API.postman_collection.json. Import this into Postman to test API endpoints manually.
Currently, the frontend relies on linting and type checking.
cd frontend
npm run type-checkcd frontend
npm run lintA comprehensive verification script checks the health of the entire local environment.
Windows:
.\VERIFY_SETUP.batThis script checks:
- Python & Node.js versions.
- Configuration files existence.
- Database connection (via Python script).
- Directory structure integrity.
Flask logs are output to stdout. In production (Azure), these can be viewed in the Log Stream.
Use the React Developer Tools extension in your browser to inspect component state and Context values.