Adding e2e testing
This commit is contained in:
@@ -208,6 +208,20 @@ Or in Docker:
|
||||
docker compose exec api pytest --cov=app --cov-report=term-missing
|
||||
```
|
||||
|
||||
### End-to-End Testing
|
||||
Browser e2e tests use pytest plus Playwright. The recommended path is the containerized runner, which joins the same Compose network as the app and opens the web service at `http://web`.
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.yml -f docker-compose.e2e.yml up -d db api web
|
||||
docker compose -f docker-compose.yml -f docker-compose.e2e.yml run --rm e2e
|
||||
```
|
||||
|
||||
Authenticated browser tests are skipped unless `E2E_ADMIN_USERNAME` and `E2E_ADMIN_PASSWORD` are supplied. See [`tests/e2e/README.md`](./tests/e2e/README.md) for credential examples, host-run instructions, and guidance for adding specs.
|
||||
|
||||
The e2e Compose override uses a separate MySQL container and volume, so tests do not use the normal dev/prod database configured in `.env`. It is still a real MySQL database, but isolated for e2e.
|
||||
|
||||
E2e reports are written to `test-results/e2e-report.html` and `test-results/e2e-junit.xml`.
|
||||
|
||||
## Additional Features
|
||||
|
||||
### Email Notifications
|
||||
|
||||
Reference in New Issue
Block a user