I read couple articles about Consumer Contract Testing, but I cannot find answer to one question.
Let’s say I have 3 microservices: A, B, C. The communication looks like that:
A -> B -> C
Now I want to test contract between A and B. Should I start services B and C or only B in mocked/stubbed mode?
1
In the above scenario, if you’re testing communication between A
and B
, you don’t want to mock B
(since you’re testing it, or at least the A
-facing part of B
). Mocking C
would be appropriate here.
1