Start containers and run tests:
cd tests
make test # Start containers + run tests (excludes slow/sdk/GPU)Validate suite tags without starting containers:
make validate-tagsOr step by step:
make start # Start test containers
make all # Run all tests (excludes slow/sdk/GPU)
make stop # Stop containersNote: Default test runs exclude slow tests (backend restarts, long timeouts) and sdk tests (unreleased SDK features) for faster feedback. Run these explicitly with make test-slow or make test-sdk when needed.
Run specific test suites:
make endpoints # API endpoint tests
make integration # End-to-end workflows
make infra # Infrastructure resilience tests
make configuration # Container-independent configuration testsSlow Tests (excluded by default for faster feedback):
make test-slow # Run ONLY slow tests (backend restarts, long timeouts)- Backend restart tests (service stop/start cycles)
- Connection resilience tests
- Tests requiring >30s timeouts
- Excluded from default
make testruns
SDK Tests (excluded until SDK is released):
make test-sdk # Run ONLY SDK tests (unreleased features)- SDK client library tests
- SDK authentication tests
- SDK upload/retrieval tests
- Excluded from default
make testruns until SDK is published
All Tests Including Excluded:
make test-all-with-slow-and-sdk # Run everything including slow and SDK testsAll container operations are available through simple Makefile targets:
| Command | What it does |
|---|---|
make start |
Start test containers (or reuse if healthy) |
make stop |
Stop containers (saves logs automatically) |
make restart |
Restart containers (keep same images) |
make rebuild |
Rebuild images and restart (for code changes) |
make containers-clean |
Saves logs → stops → removes everything |
make status |
Show container health and ports |
make logs SERVICE=<name> |
View logs for specific service |
Important: Containers are NEVER removed without saving logs first!
Logs are automatically saved to: tests/logs/YYYY-MM-DD_HH-MM-SS/
make logs SERVICE=chronicle-backend-test # Main backend service
make logs SERVICE=workers-test # RQ workers
make logs SERVICE=mongo-test # MongoDB
make logs SERVICE=redis-test # Redis
make logs SERVICE=speaker-service-test # Speaker recognitionmake containers-clean # Clean previous state (saves logs)
make test # Start fresh + run all testsmake start # Start containers once
make test-quick # Run tests (fast, no container startup)
make test-quick # Run again (even faster)# After modifying Python code
make rebuild # Rebuild images with latest code
make test-quick # Run tests on new buildTest services run on separate ports from production to avoid conflicts:
| Service | Test Port | Production Port |
|---|---|---|
| Backend API | 8001 |
8000 |
| MongoDB | 27018 |
27017 |
| Redis | 6380 |
6379 |
Test Database: Uses test_db database (isolated from production)
Test Credentials:
- Admin Email:
test-admin@example.com - Admin Password:
test-admin-password-123 - JWT Secret:
test-jwt-signing-key-for-integration-tests
make status # See what's running
make stop # Stop test containersIf ports are still in use by other services:
lsof -i :8001 # Find what's using port 8001
# Kill the process or stop the conflicting service# View backend logs
make logs SERVICE=chronicle-backend-test
# View worker logs
make logs SERVICE=workers-test
# Check container health
make statusmake containers-clean # Saves logs + full cleanup
make start # Fresh startContainers won't start:
make status # Check current state
make containers-clean # Full cleanup (saves logs)
make start # Start freshHealth checks failing:
make logs SERVICE=chronicle-backend-test # Check backend logs
# Common issues: MongoDB not ready, Redis connection failedTests hang or timeout:
# Check if services are healthy
make status
# View logs for stuck service
make logs SERVICE=workers-testAll cleanup operations preserve logs automatically!
When you run make containers-clean or make clean-all:
- Step 1: Logs are saved to
tests/logs/YYYY-MM-DD_HH-MM-SS/ - Step 2: Containers are stopped and removed
- Step 3: Volumes are removed
Each log directory contains:
- Service logs for all containers
- Container status snapshot
- Container resource usage stats
- Test results (if available)
View saved logs:
ls -lh tests/logs/ # List all log archives
cat tests/logs/2026-01-17_14-30-45/chronicle-backend-test.logChronicle tests are separated into two execution paths:
These tests run without external API dependencies:
- Endpoint tests (CRUD operations, permissions)
- Infrastructure tests (workers, queues, health checks)
- Basic integration tests
Configuration: Uses configs/mock-services.yml (no transcription/LLM)
These tests require external services:
- Full E2E tests with transcription (Deepgram)
- Memory extraction tests (OpenAI)
- Transcript quality verification
Configuration: Uses configs/deepgram-openai.yml
Setup:
# Copy template
cp setup/.env.test.template setup/.env.test
# Add API keys
DEEPGRAM_API_KEY=your-key-here
OPENAI_API_KEY=your-key-hereFaster iteration:
- Start containers once:
make start - Run specific test suite:
make endpoints - Keep containers running between test runs
- Only rebuild when code changes:
make rebuild
Debugging specific tests:
# Run Robot Framework directly for a single test file
cd tests
uv run --with-requirements test-requirements.txt robot \
--outputdir results \
--test "Specific Test Name" \
endpoints/test_user.robotClean iteration cycle:
# 1. Make code changes
# 2. Rebuild containers
make rebuild
# 3. Run specific test suite
make endpoints
# 4. View logs if needed
make logs SERVICE=chronicle-backend-test
# 5. RepeatTechnical Details: Tests use Robot Framework for end-to-end validation, but you don't need to know Robot Framework to run tests. Just use the Makefile commands above.
For Robot Framework test development guidelines, see:
TESTING_GUIDELINES.md- Comprehensive testing patterns and standardstags.md- Approved test tags and usage