| Step | Title | Concept Covered | Learning objectives | Further Reading | | ----------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | | step 1 | Create our consumer before the Provider API even exists | Consumer-driven design |
- Understand use case
- How to write a basic unit test for an HTTP Client
- Understand how a unit test is unable to catch certain integration issues
- Understand basic Consumer-side Pact concepts
- Understand "Matchers" to avoid test data brittleness
- Demonstrate that Pact tests are able to catch a class of integration problems
- https://docs.pact.io/5-minute-getting-started-guide#scope-of-a-consumer-pact-test
- https://docs.pact.io/best_practices/consumer
- Understand basic Provider-side Pact concepts
- Place provider side testing in a broader testing context (e.g. where it fits on the pyramid)
- Understand that a tool facilitates collaboration, it doesn't replace it
404
(missing User) in consumer | Testing API invariants | - Understand how we can test "stateful" APIs without having to create complex, sequential API calls
404
case | Provider States | - How Pact deals with "stateful" interactions, via the concept of "Provider States"
401
case | Testing authenticated APIs | - Service evolution - adding a new feature
401
case | Service evolution | - Understand the challenge of dealing with complex/dynamic data, such as time-bound authentication tokens
401
case | Request filters | - Understand Pact's approach to dealing with complex/dynamic data, such as time-bound authentication tokens
- Understand how to use Pact in a CI and CD workflow