pnpm install# In one terminal, start the test environment
docker-compose -f apps/api-service/docker-compose.e2e.yml up -d
# Wait for services to be ready (30-60 seconds)# Run all E2E tests
pnpm run test:e2e
# Or run from api-service directory
cd apps/api-service
pnpm run test:e2e# Test basic API functionality
pnpm run test:e2e --testNamePattern="Basic API"
# Test gasless transactions
pnpm run test:e2e --testNamePattern="Gasless Transaction"
# Test failure scenarios
pnpm run test:e2e --testNamePattern="Failure"# Run tests in watch mode
pnpm run test:e2e --watch
# Run only failed tests
pnpm run test:e2e --onlyFailures# Stop all services
docker-compose -f apps/api-service/docker-compose.e2e.yml down -v
# Start fresh
docker-compose -f apps/api-service/docker-compose.e2e.yml up -d# View running containers
docker-compose -f apps/api-service/docker-compose.e2e.yml ps
# View logs
docker-compose -f apps/api-service/docker-compose.e2e.yml logs api-service# Run with verbose output
pnpm run test:e2e --verbose
# Enable debug logging
LOG_LEVEL=debug pnpm run test:e2e
# Run single test file
pnpm run test:e2e apps/api-service/test/e2e/basic-api.e2e-spec.tsBefore running E2E tests, ensure you have:
- Node.js 18+ installed
- Docker and Docker Compose installed
- pnpm package manager installed
- Dependencies installed (
pnpm install) - Test services running (
docker-compose up -d) - Environment variables configured
# Check if services are running
docker-compose -f apps/api-service/docker-compose.e2e.yml ps
# Restart services if needed
docker-compose -f apps/api-service/docker-compose.e2e.yml restart# Check PostgreSQL logs
docker-compose -f apps/api-service/docker-compose.e2e.yml logs postgres
# Restart database
docker-compose -f apps/api-service/docker-compose.e2e.yml restart postgres# Increase Jest timeout
pnpm run test:e2e --testTimeout=30000- Read the full E2E Testing Documentation
- Explore test implementation examples
- Review CI/CD integration
- Check test utilities
Need help? Check the full documentation or create an issue