README
Database REST API Lab & Testing Framework
This repository contains two main components organized for clarity and ease of use.
🧪 Lab: Multi-Service REST API Environment
Location: lab/
A complete REST API learning environment featuring:
- Groovy Spring Boot backend - Full CRUD operations for customers, orders, tickets
- Go microservice - Hexagonal architecture with geolocation features
- SQLite database - File-based, portable, version-controlled
- Web frontend - Modern UI for all entities
- Docker orchestration - Everything containerized and ready to run
👉 Start here: lab/README.md
Quick Start (Lab)
bash
cd lab
./build-all.sh
./dev-all.shAccess:
- Frontend: http://localhost:3000
- Groovy API: http://localhost:8080/swagger-ui.html
- Go API: http://localhost:8081/swagger/index.html
🧬 Testing: API Equivalence Framework
Location: api-compare/
Advanced API testing framework with fully dynamic workflow generation. No manual YAML writing required - workflows are automatically generated from captured API data.
Features:
- Dynamic workflow generation from captured API requests/responses
- Automatic resource discovery and grouping
- Smart ID variable substitution (
{{customer_id}}) - Auto-detected timestamp ignore fields
- OpenAPI/Swagger integration
- Works with any REST API structure
Quick Start (Testing)
bash
cd test-suite
# Capture API data (saves responses + metadata)
../api-compare/capture-api-generated.sh
# Generate workflows dynamically
../api-compare/generate-workflows.sh
# Run tests
../api-compare/api-test ../api-compare/workflows/
📁 Repository Structure
shell
db-restapi-lab/
├── lab/ # Complete REST API lab environment (working)
│ ├── backend/ # Groovy Spring Boot service
│ ├── shops-service/# Go microservice
│ ├── frontend/ # Web UI
│ ├── data/ # SQLite database
│ ├── docker-compose.yml
│ └── ...
│
├── api-compare/ # API equivalence testing framework
│ ├── main.go # Test runner
│ ├── compare # Built binary
│ └── ...
│
├── test-suite/ # Your test files (created during workflow)
│ ├── openapi-spec.json # API specification
│ └── api-captures/ # Captured responses + metadata
│ ├── *.json # API responses
│ └── *.meta.json # Request metadata (for workflow generation)
│
├── getting-started/ # Step-by-step testing guide
│ ├── 01-setup.md
│ ├── 02-create-openapi.md
│ └── ...
│
└── README.md # This file
🎯 Use Cases
Lab Environment
- Learning multi-service architecture
- Practicing REST API development
- Understanding hexagonal/clean architecture
- Testing Docker orchestration
- Exploring Swagger/OpenAPI documentation
Testing Framework
- Validating API equivalence across implementations
- Automatically generating test workflows from captured data
- Capturing and replaying API interactions
- Regression testing for API changes
- Zero-configuration workflow creation
📚 Documentation
- Lab: lab/README.md - Complete system overview
- Lab Quick Start: lab/QUICK-START.md - Get running in 3 commands
- Testing Guide: getting-started/ - Step-by-step testing workflow
- Claude Prompts: api-compare/testing-how-to/CLAUDE-CODE-PROMPTS.md - Ready-to-use prompts
🚀 Quick Navigation
| I want to... | Go to... |
|---|---|
| Run the REST API lab | cd lab && ./dev-all.sh |
| Learn about the architecture | lab/README.md |
| Test the APIs | lab/QUICK-START.md |
| Generate test workflows automatically | test-suite/README.md |
| Run API equivalence tests | cd test-suite && ../api-compare/api-test ../api-compare/workflows/ |
| Use Claude Code prompts | api-compare/testing-how-to/CLAUDE-CODE-PROMPTS.md |
Happy Coding! 🚀