The Itarazzo Client allows for the container-based execution and integration of workflow tests based on the Arazzo Specification.
Note: This project is developed in my free time alongside family and full-time work. Any feedback or contributions are greatly appreciated as I strive to make this tool as helpful as possible for other developers.
- Parameters
- Docker Configuration
- Building and Running the Docker Image
- Using Docker Compose
- Execution Notes
- Security
To configure the workflows, two environment variables need to be specified:
ARAZZO_FILE: Path or URI to the Arazzo specification (e.g.,/itarazzo/specs/pet-store.arazzo.yaml)ARAZZO_INPUTS_FILE: Path to a valid JSON file that contains input values for the workflow test (e.g.,/itarazzo/specs/arazzo-inputs.json)
The Itarazzo client runs within a Docker container as a non-root user (itarazzobot) in the working directory /itarazzo.
Use the following commands to build and run the Docker image:
# Build the Docker image
docker build -t itarazzo-client .
# Run the container
docker run --rm \
-e ARAZZO_FILE=/itarazzo/specs/pet-store.arazzo.yaml \
-e ARAZZO_INPUTS_FILE=/itarazzo/specs/arazzo-inputs.json \
-v /path/to/specsDir:/itarazzo/specs \
-v /path/to/reportsDir:/itarazzo/target/reports \
itarazzo-client- Sets the environment variables
ARAZZO_FILEandARAZZO_INPUTS_FILE. - Mounts the local directory
path/to/specsDirto/itarazzo/specs, allowing access to specifications in the container. - Mounts
path/to/reportsDirto/itarazzo/target/reportsso that test reports are available on the host machine.
There is also a docker-compose.yaml which simplifies starting the container:
services:
itarazzo:
image: leidenheit/itarazzo-client:latest
environment:
- ARAZZO_FILE=/itarazzo/specs/pet-store.arazzo.yaml
- ARAZZO_INPUTS_FILE=/itarazzo/specs/arazzo-inputs.json
volumes:
- ./src/test/resources:/itarazzo/specs
- ./target/reports:/itarazzo/target/reports
stop_grace_period: 30sdocker-compose up --buildThis command builds and starts the container, runs the tests, and exits automatically when done.
The container will automatically exit after completing the tests.
Itarazzo Client makes real API requests. Please take care to avoid unintentionally interacting with production systems.