Is Design for Testability Language Dependent?

As part of my design for testability talk, I talked about how tools and languages impact testability. Then I came about Brett Schuchert’s post about TDD and if it’s language neutral.

The post concentrates on how different TDD looks like in different languages. Moreover, how it is interpreted, based on the language of choice. And Brett gives example of where solutions would look similar. Or not.

One of the points in my talk is that testability is also tool and language-dependent. Tool-side? Isolator, of course. No matter how you design your code, it’s still testable. On the language side, dynamic languages are more test-ready. Just replace the behavior of one method with another, like in Ruby, for example. No need for fake objects, you get testability as part of the core language.

When you write your application, choose carefully. Examine both languages and tools, as part of your research. Then remember: testability is not a goal, good readable design is. Make that the crux of your decision.

Leave A Reply

Your email address will not be published. Required fields are marked *