Repository navigation
Testing Guide
This document explains how to run the tests for both the frontend and backend of the project. Please follow the steps below based on the part of the project you wish to test.
Frontend Tests (vitest)
The frontend tests are configured to run using pnpm. To execute these tests, follow these steps:
-
Ensure you are in the
frontend/directory of the project.cd frontend -
Run the tests using the following command:
pnpm testThis command will execute all defined frontend tests and output the results in the terminal.
Backend Tests (pytest)
The backend tests are defined using pytest with coverage reporting enabled. To execute these tests, follow these steps:
-
Navigate to the
backenddirectory.cd backend -
Run the tests with the following command:
pytest --cov=app --cov-report=term-missing --cov-report=html:./tests/coverage_report
With this, you will run all tests and generate a coverage report in
backend/tests/coverage_report/directory. -
To open the HTML coverage report in your browser for a detailed breakdown of the test coverage:
open ./tests/coverage_report/index.html
- Ensure all necessary dependencies are installed before running the tests. Refer to the Installation Guide for setup instructions.
- If you encounter any issues, please review the error messages carefully or consult the documentation for the respective testing tools (
pnpmandpytest).
For more detailed information, troubleshooting, or if you need to go back to the main documentation, please refer to the README.md.