A tiny Docker appliance for running cross-repo integration tests; Crossdock is:
- Portable - runs anywhere Docker is installed, eg Travis & locally.
- General - can be used to test sets of libraries and microservices.
- Flexible - test all combinations of behaviors using custom matrix axis.
- Decentralized - each repo can configure and run Crossdock independently from the others.
- Light - run Crossdock for every commit on every repo in parallel.
- Easy - run integration tests on a large project without installing every component.
How It Works
Given the following
crossdock: image: crossdock/crossdock dns_search: . # Ensures unified DNS config. links: - alpha - omega environment: - WAIT_FOR=alpha,omega - AXIS_CLIENTS=alpha,omega - AXIS_SPEED=fast,slow - BEHAVIOR_DANCE=clients,speed - BENAVIOR_RUN=clients,speed alpha: image: breerly/hello-server dns_search: . ports: - 8080 environment: - HELLO_PORT=8080 - HELLO_MESSAGE=ok omega: image: breerly/hello-server dns_search: . ports: - 8080 environment: - HELLO_PORT=8080 - HELLO_MESSAGE=ok
Running Crossdock will initiate tests for clients
every combination of
$ docker-compose run crossdock Beginning matrix of tests... STATUS | CLIENT | RESPONSE | SPEED | BEHAVIOR +--------+--------+----------+-------+----------+ PASSED | alpha | ok | fast | dance PASSED | alpha | ok | fast | run PASSED | alpha | ok | slow | dance PASSED | alpha | ok | slow | run PASSED | omega | ok | fast | dance PASSED | omega | ok | fast | run PASSED | omega | ok | slow | dance PASSED | omega | ok | slow | run
How To Use
- Write Test Client
- Run Crossdock
- Publish Test Client
- Integrate Other Repos
- Add Other Test Axis
- Run During Continuous Integration