A test harness for validating OneBusAway API server behavior using known GTFS data inputs.
- Docker
- Docker Compose
- Go 1.24+
- Clone the repository:
git clone https://github.com/OneBusAway/api-validator.git- Install gotestsum:
go install gotest.tools/gotestsum@latest- Build the test environment image:
docker compose -f docker/docker-compose.yml build- Run the orchestrator:
make run-orchestratorFor advanced usage, CLI flags, and configuration options, see the Orchestrator documentation: orchestrator
- OBA Server: http://localhost:8085
- MySQL Database: localhost:3310
- Database: oba_database
- User: oba_user
- Password: oba_password
If the orchestrator fails with timeout errors while waiting for the OBA server:
The orchestrator pings the /api/where/config.json?key=TEST endpoint until it gets a response within the timeout window. The current timeout window is 180 seconds.
If timeouts persist, try increasing the timeout value further.
To increase the server startup timeout, edit the StartObaServerAndWait function in this file:
cmd/orchestrator/environment.go
func (e *Environment) StartObaServerAndWait() error {
// increase the ctx deadline
ctx, cancel := context.WithTimeout(e.ctx, 300*time.Second)
defer cancel()
}If the above steps still don't resolve the timeout issues, verify the following:
- Start services manually:
docker compose -f ./docker/docker-compose.yml up -d- Check server startup:
docker exec -it oba_server_testing_container /bin/bash/usr/local/tomcat/bin/catalina.sh start- Monitor logs for startup issues and verify the server starts correctly.
For detailed documentation on specific components, see the /docs folder:
- GTFS-RT Server - Mock GTFS-Realtime server for testing
- API Validation - API validation framework
- JSON Validator - JSON response validation
- Schema Validator - Schema validation utilities
- Test Cases - Test case documentation
- Test Logging - Test logging framework
- Time Simulation - Time control for testing
/docker: Docker configuration and scripts for test environment/cmd: Command-line tools and orchestrator/testdata: GTFS test data/tests: Test suites/internal: Internal packages for test infrastructure/docs: Component documentation