- Testing micro services - the sane way
- Fowler - Testing Strategies in Microservice Architecture
- Fowler - Contract test
- Fowler - customer driven contract tests
- 7 reasons for consumer driven contracts
- Pact at John Lewis & Partners
- Oracle - How to Test Java Microservices with Pact
- YouTube talk
./gradlew setupPactBroker
Create provider:
./gradlew createProvider
git clone https://github.com/pact-foundation/pact-broker-docker.git
cd pact-broker-docker
docker-compose up
Create provider:
curl -v -XPOST -H "Content-Type: application/json" -d "{\"name\": \"ExampleProvider\"}" http://localhost:9292/pacticipants
./gradlew :example-consumer-ronaldo:build
./gradlew :example-consumer-ronaldo:pactPublish
./gradlew :example-consumer-messi:build
./gradlew :example-consumer-messi:pactPublish
./gradlew :example-provider:build
./gradlew :example-provider:pactVerify -PrequestVerification=true
Publish results:
./gradlew :example-provider:pactVerify -PrequestVerification=true -Ppact.verifier.publishResults='true'
- Kill task setupPactBroker
- Kill dockers
./killDockers.sh