# Testing At SocratesCode, we treat testing as a crucial part of the development process (Test-driven development). This is because testing helps us ensure that the code is working as expected and helps us catch bugs early, reducing the time and effort required to identify and fix them. To test the application, cd into the `apps/ai` directory and run the following command: ```bash uv sync # if you haven't initialized the project ``` then run the following command (recommended): ```bash uv run pytest --cov=. -v # for coverage report ``` This will run the tests with coverage report printed out. Additionally, if you want to monitor the output, append the following flag: ```bash uv run pytest --cov=. -v --capture=tee-sys ``` This will capture all stdout (or print) from python (ref [here](https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html) - note it is a bit technical). It is useful for debugging as normal `pytest` won't show those verbose displayed on console.