I'd like to measure, how well unit-testable is my code. I don't have a concrete idea, how it should look like, but my logic is:
There are a lot of formally checkable and quantifiable criteria for well testable code:
- usage of global/static functions/variables,
- cyclomatic complexity,
- DI vs. wild direct instantiating of classes, where they are used,
- and many more.
And since the testability of code can be described by quantifiable criteria, it should be possible to quantify the testability itself.
Is there something like a "testability index"? How to quantify/measure the testability of an application?