Skip to content

Comment on When TDD Doesn't Workparent

Comments

Unit tests don't have to test everything... just the units. Integration tests should be testing the interactions between different modules. And system tests should be the whole stack top-to-bottom. It ends up looking like a pyramid.

Yes thank you I know the testing pyramid. But testing should concentrate on what adds value and a zillion unit tests, with everything mocked often don't. Infact they can be a distraction from the bigger picture. Rather than rules, methodologies etc. we should TWMS - Test What Makes Sense. Or even better TWAV - Test What Adds Value. Or DTFTS - Don't Test For Testings' Sake.

If I understood correctly I think that's what Uncle Bob was trying to argue for in this blog post.

I don't think having 3-4 tests per LOC is such a bad thing. Far more testing goes into the sqlite codebase and I think it'd be hard to argue that it could have been better if the developers had stopped wasting their time and concentrated on what added value.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.