1
•
•
•
•
•
• 2
3
●
●
4
Checkout Service - Consumer Order Candidate Service - Provider
We know the individual modules work
5
All the modules in the system work together
6
Check the integration with an mock of the external dependency
7
• Mock is a method/object that simulates the behavior of a real method/object in controlled ways.
• Stubs are programs that simulate the behaviors of software components (or modules) that a
module undergoing tests depends on.
8
9
10
11
12
13
Test the service in the real integrated environment
14
15
16
17
18
19
20
21
Participants:
22
23
Checkout Service - Consumer Order Candidate Service - Provider
24
25
26
27
28
29
Developing Contracts with Spring Cloud Contract
30
• Replacing the existing WSP Checkout
• Starting with multiple teams
• Front-end team (WSP Checkout)
• API team (Checkout API)
• Needed
• Some way to define API behaviour without API being available (Mocks)
• Being able to work independently without getting ‘out-of-sync’
• Solution
• Formalize using Contract defintions and automate verification
Webshop Checkout Project
31
32
34
35
36
37
visualisation of the contracts
dependencies between all known
consumers and producers
38
till next bol.com
Stephan Oudmaijer

Consumer Driven Contract Testing