Decoupling tests from APIs

Changing interfaces (e.g. API web handlers, queue event handlers, web pages) is common and can impact many tests. How can we decouple them from those changes?

Luís Soares
CodeX
Published in
5 min readAug 24, 2022

--

Photo by Bernd Dittrich on Unsplash

Ideally, when refactoring, we don’t want to update any tests. Besides the refactoring pain, think about the verbosity of making HTTP calls or resorting to…

--

--

Luís Soares
CodeX
Writer for

I write about automated testing, Lean, TDD, CI/CD, trunk-based dev., user-centric dev, DDD, coding good practices,