-
Start Docker services (PostgreSQL and Redis):
docker-compose -f docker-compose.dev.yml up -d postgres redis
-
Start the backend server:
cd backend source test_env/bin/activate # or your virtual environment DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/postgres" \ REDIS_URL="redis://localhost:6379" \ ENV="test" \ uvicorn main:app --host 0.0.0.0 --port 8000
-
Start the frontend server:
cd web npm run build # if not already built NEXT_PUBLIC_API_URL="http://localhost:8000/graphql" npm start
-
Wait for servers to be ready:
- Backend:
http://localhost:8000/healthshould return{"status": "ok"} - Frontend:
http://localhost:3000should return HTTP 200
- Backend:
cd tests
E2E_BASE_URL="http://localhost:3000" CI=true npx playwright testNote for NixOS users: Playwright's Chromium browser cannot run directly on NixOS due to dynamic linking limitations. The error message will indicate:
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box.
Solutions for NixOS:
- Use GitHub Actions to run E2E tests (recommended)
- Use a Docker container to run the tests
- Configure NixOS with proper FHS (Filesystem Hierarchy Standard) support
The tests are designed to work correctly on GitHub Actions (Ubuntu runners).
E2E tests run automatically on:
- Push to
mainordevelopbranches - Pull requests to
mainordevelopbranches
The main workflow (tests.yml) includes proper E2E test setup with dependency installation.