Testing¶
This guide covers the testing strategy for the Tileverse project.
Overview¶
We use a tiered testing approach:
- Unit Tests: Fast, in-memory tests using JUnit 5 and Mockito.
- Integration Tests: Docker-based tests using Testcontainers to verify interactions with real services (S3, Azure, GCS, HTTP).
- Benchmarks: JMH microbenchmarks for critical paths.
Running Tests¶
Unit Tests¶
Integration Tests¶
Requires Docker to be running.
Specific Modules¶
# Run tests for PMTiles only
./mvnw test -pl tileverse-pmtiles
# Run S3 integration tests
./mvnw verify -pl tileverse-rangereader/s3
Test Infrastructure¶
Testcontainers¶
We use specific images to emulate cloud environments:
- AWS S3:
localstack/localstack - Azure Blob:
mcr.microsoft.com/azure-storage/azurite - GCS:
fsouza/fake-gcs-server - HTTP:
nginx:alpine
Performance Benchmarks¶
Benchmarks are located in the tileverse-rangereader/benchmarks module.