DEV Community

Discussion on: Is testability a reason to change your design?

Collapse
 
n_develop profile image
Lars Richter • Edited

I think that "BECAUSE TEST!" is roughly the same as "BECAUSE SECURITY!" or the nebulous "BECAUSE UX!".

It sounds so negative, when you say it like that. :-) But to be serious: In general you are right. Testing/Testability shouldn't be the main goal. No doubt here. Nevertheless, sometimes I make decisions, like the one mentioned in the post (introducing an interface), to make something testable. Nothing more. Just make it testable (or as you like to say it "BECAUSE TEST!" ;-) ).

c) The goal is not test. The goal is confidence.

And we should always keep in mind: A working test suite gives a lot of confidence.

Collapse
 
dwd profile image
Dave Cridland

Absolutely - a working test suite is a great way to get confidence. A working and audited test suite even more so.