-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Guide
This guide provides instructions on how to test the Academic Team Management application to ensure the codebase is reliable, efficient, and meets expected standards. The testing process includes backend, frontend, and end-to-end (E2E) tests.
Before running any tests, ensure you have the following installed and set up:
- Node.js
- Python
- Docker
- Cypress
- Ensure all dependencies are installed by running
npm installorpip installas required.
Backend unit tests verify the correctness of individual functions and endpoints in the server.
How to Run Backend Tests:
- Navigate to the server directory.
- Run the following command:
pipenv run test-unit
- Check the console output for test results and ensure all tests pass.
*Ensure that Pipenv environment is set up correctly with command pipenv check. If this fails, ensure a Pipfile exists in the server directory and install dependencies: pipenv install.
Frontend unit tests validate the behavior of React components and utility functions.
How to Run Frontend Tests:
- Navigate to the client directory.
- Run the following command:
npm test - Look for detailed results in the console or generated reports.
E2E tests simulate user interactions across the entire application to ensure workflows function as intended.
How to Run E2E Tests:
-
Ensure both the backend and frontend are running:
- Backend:
./gradlew runBackendLocally
- Frontend:
./gradlew runFrontendLocally
- Backend:
-
Run the E2E test suite with:
npx cypress run
or with opening a browser
npx cypress open
-
Review test logs for results and troubleshoot any failures.
Linting checks your code for style and syntax issues to maintain consistency.
Run the Linter:
npm run lintFix any reported issues to ensure your code adheres to standards.
-
Database Connection Errors:
Ensure MongoDB is running before executing backend tests. Use the command:./gradlew startMongo
-
Environment Variable Issues:
Ensure all required environment variables (like database credentials) are properly configured in the.envfile. -
Missing Dependencies:
Reinstall dependencies using the following commands:- For Node.js:
npm install - For Python:
pip install -r requirements.txt - For Cypress:
npm install cypress --save-dev
- For Node.js:
Documentation and Resources
Follow links for local development and helpful information.
Onboarding Material MUST READ!!! Essential information to get started with the project.
React App How to get started with web application project using Create React App.
Historical documents, do not need to read.
Project Management
Deliverables
Deliverable 1
Andre Pitch (Downloadable PDF)
Caroline Pitch (Downloadable PDF)
Laith Pitch (Downloadable PDF)
Deliverable 2
Deliverable 3