step 1 |
Create our consumer before the Provider API even exists |
Consumer-driven design |
|
|
step 2 |
Write a unit test for our consumer |
- |
- How to write a basic unit test for an HTTP Client
- Understand how a unit test is unable to catch certain integration issues
|
|
step 3 |
Write a Pact test for our consumer |
Consumer side pact test |
- Understand basic Consumer-side Pact concepts
- Demonstrate that Pact tests are able to catch a class of integration problems
|
|
step 4 |
Verify the consumer pact with the Provider API (Gradle) |
Provider side pact test |
- Learn how to verify using a Gradle Task
- Understand basic Provider-side Pact concepts
- Place provider side testing in a broader testing context (e.g. where it fits on the pyramid)
|
|
step 5 |
Verify the consumer pact with the Provider API (Unit test) |
Provider side pact test |
- Learn how to verify using JUnit
- Understand basic Provider-side Pact concepts
- Place provider side testing in a broader testing context (e.g. where it fits on the pyramid)
|
|
step 6 |
Fix the consumer's bad assumptions about the Provider |
Humans talking to humans (collaboration) |
- Understand that a tool facilitates collaboration, it doesn't replace it
- Understand "Matchers" to avoid test data brittleness
|
|
step 7 |
Fix the date format in the Provider |
Humans talking to humans (collaboration) |
- Understand that a tool facilitates collaboration, it doesn't replace it
|
|
step 8 |
Test missing query parameter |
Non-happy path testing |
- Test variations in API usage
|
|
step 9 |
Verify provider with missing query parameter |
Service evolution |
- Understand benefits of consumer-driven design
|
|
step 10 |
Update provider to handle missing query parameter |
Service evolution |
- Understand benefits of consumer-driven design
|
|
step 11 |
Write a pact test for 404 (no data) in consumer |
Testing API invariants |
- Understand how we can test "stateful" APIs without having to create complex, sequential API calls
|
|
step 12 |
Update Provider API to handle 404 case |
Provider States |
- How Pact deals with "stateful" interactions, via the concept of "Provider States"
|
|
step 13 |
Implement a broker workflow for integration with CI/CD |
Automation |
- Understand how to use Pact in a CI and CD workflow
|
|