7 ms·
I was at realestate.com.au when they started writing microservices in 2013 and we were all facing this exact issue. Out of that experience, the (now open source
by bethesque 7y ago
I was at realestate.com.au when they started writing microservices in 2013 and we were all facing this exact issue. Out of that experience, the (now open source) contract testing tool called "Pact" was written (I am now one of the maintainers). I wrote a blog about the combinatorial explosion problem here many years ago now! https://www.rea-group.com/blog/enter-the-pact-matrix-or-how-to-decouple-the-release-cycles-of-your-microservices/ https://www.rea-group.com/blog/enter-the-pact-matrix-or-how-...
From the Pact docs: 'Contract testing is a technique for testing an integration point by checking each application in isolation to ensure the messages it sends or receives conform to a shared understanding that is documented in a "contract".' By focussing just on the messages we get tests which are fast, give us quick feedback, and scale linearly instead of combinatorially.
Some good resources are:
https://pact.io https://pact.io (for information about contract testing and the Pact tool itself)
https://pactflow.io/how-pact-works/ https://pactflow.io/how-pact-works/ (explains how Pact works)
https://docs.pact.io/faq/convinceme https://docs.pact.io/faq/convinceme (answers the question of why you would want to do contract testing)
https://slack.pact.io https://slack.pact.io (a friendly 1000+ member community which is very experienced dealing with these kinds of issues)
https://docs.pact.io/pact_broker/can_i_deploy https://docs.pact.io/pact_broker/can_i_deploy (addresses how we handle and channel this combinatorial explosion for good instead of evil!)
- hinkley 7y agoI did a stupid simple thing for a system with a small fanout footprint. Not sure this scales. The organizing principal was that if my code passed the acceptance tests once, the very same code should still pass with your service/library/data added to the mix. If they don’t, it’s likely your code and not mine. This might not seem like much but it cuts hours of finger pointing out of a three party system. I expect this effect would be multiplied for a five or ten party scenario. And in particular, latency has a huge negative impact on behavioral modification. People will keep doing things that they get yelled at over three weeks later. They will stop doing things they get called on hours later. Which I would hope offsets the additional test matrix complexity.
- taleodor 7y agoThank you, great read and Pact looks interesting.
- BerislavLopac 7y agoIf I'm not mistaken, Pact is using a proprietary JSON format to define the contracts. I'm curious, is it possible to use it with a standard specification format, like OpenAPI/Swagger?