This question already has an answer here:
- How to Avoid Fragile Unit Tests? 7 answers
I work on a software that has a lot of tests. However, instead of helping us develop faster, these tests actually bog us down, because even tiny changes in the application break many tests. Clearly, the tests are too tightly coupled to the application.
A big problem is that our application is not designed with testability in mind. We have big classes with lots of dependencies to other classes, we use singletons and we have lots of mutable state, we don't use DI, we don't use PImpl. Our modules are also coupled fairly tightly to each other.
I wonder whether there are any general techniques we could use to reduce this coupling. Preferably without rewriting large parts of our application to make it easier to test.