mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
feat(docs): report.md update and added options to test-with-ephemeral-mariadb.sh
This commit is contained in:
@@ -269,28 +269,33 @@ open http://localhost:5173
|
||||
```
|
||||
|
||||
## Testing Instructions
|
||||
The tests are located in 7project/backend/tests directory
|
||||
If you want to test locally, you have to have the DB running locally as well (start the docker compose in /backend).
|
||||
The tests are located in 7project/backend/tests directory. All tests are run by GitHub actions on every pull request and push to main.
|
||||
See the workflow [here](../.github/workflows/run-tests.yml).
|
||||
|
||||
If you want to run the tests locally, the preferred is to use a [bash script](backend/test-with-ephemeral-mariadb.sh)
|
||||
that will start a [test DB container](backend/docker-compose.test.yml) and remove it afterward.
|
||||
```bash
|
||||
cd backend
|
||||
cd 7project/backend
|
||||
bash test-with-ephemeral-mariadb.sh
|
||||
```
|
||||
|
||||
|
||||
### Unit Tests
|
||||
There are only 3 basic unit tests, since our services logic is very simple
|
||||
```bash
|
||||
pytest tests/test_unit_user_service.py
|
||||
bash test-with-ephemeral-mariadb.sh --only-unit
|
||||
```
|
||||
|
||||
### Integration Tests
|
||||
There are 11 basic unit tests, testing the individual backend API logic
|
||||
```bash
|
||||
pytest tests/test_integration_app.py
|
||||
bash test-with-ephemeral-mariadb.sh --only-integration
|
||||
```
|
||||
|
||||
### End-to-End Tests
|
||||
There are 7 e2e tests testing more complex app logic
|
||||
There are 7 e2e tests, testing more complex app logic
|
||||
```bash
|
||||
pytest tests/test_e2e.py
|
||||
bash test-with-ephemeral-mariadb.sh --only-e2e
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
|
||||
Reference in New Issue
Block a user