quivr/docs/developers/contribution/test.mdx

41 lines
1013 B
Plaintext
Raw Normal View History

2023-07-03 12:30:29 +03:00
---
sidebar_position: 7
2023-11-05 02:24:43 +03:00
title: Testing Strategies
2023-07-03 12:30:29 +03:00
---
## Backend
- E2E Test
- User journeys
- Unit Test
- Test base classes for models for breaking change (Vectorstore, Brainpicking, etc...)
- Test endpoints
- Test utility functions
- Test critical functions
- Chat related functions
How:
2023-07-03 12:30:29 +03:00
- Pytest
### 🐛 Debugging the backend
The backend is running in a docker container. To debug the backend, you can attach a debugger to the container. The debugger server runs on port `5678`. The backend is started in dev mode with `make dev`.
#### Debug with VSCode
The configuration for this is already set up in the `launch.json` file in the `.vscode` folder. After you started the project in dev mode with `make dev` you can run a debugging session using the `Python: Remote attach` configuration.
## Frontend
2023-07-03 12:30:29 +03:00
2023-07-12 10:24:53 +03:00
- Functional tests
2023-07-03 12:30:29 +03:00
- Good rendering of components
- Backend call is made
- State is updated
- User can interact with the component
How:
2023-07-03 12:30:29 +03:00
- Vitest
2023-07-12 10:24:53 +03:00
- RTL (React Testing Library)