Efficient Testing Strategy in a microservice era
Co-authored with Arnaud Becquet
Testing strategy is important.
Testing strategy is important and most often overlooked.
Let’s face it, we learn about architecture, best practices, design patterns and other fancy developers’ tools but testing strategy is left behind. Unless we are in a team where testing is a core value (e.g. through Test First methodology), we tend to use the chameleon rule and don’t challenge the testing strategy.
This behavior may seem okay-ish or “good enough”.
It sometimes is, yet it often results in hidden maintenance costs. Any developer that tried to refactor a codebase with too many and too small unit tests can definitely relate. The thing is, it is even worse now that we are migrating to microservices architecture. End-to-end tests are harder to setup, continuous deployment requires tests to be run more often and unit tests are not enough to have a good confidence in a release.
There we are. Hopefully there are some brave knights in this story, and troubadours to sing their tale. We went from a monolith to a (micro)service architecture and we changed our testing strategy. We faced hardships, we tried things, some did work, some didn’t. We learnt and now it’s time to share our learnings :)
Watch this video to discover our testing developer toolbox (yes, writing tests is dev): unit tests, isolation testing, consumer-driven contract testing, backendless tests, property based testing, BDD, mutation testing, system under test builder … and how we use these tools to build an efficient testing strategy in the microservice era.
Oh! One more thing. If you don’t relate to “too many and too small unit tests are counter productive”, please watch this video too. You will think about your Units and write better tests afterward ;-)
(Chapters available in video description, thanks to the awesome https://www.youtubechapters.app/)