News for hackers. Stuff that matters.
Re:Test-Driven Development is Stupid by ed_blackburn on Tuesday November 24, 2015 @08:38AM (#10620599)
Which is why testing behaviour not implementation is so important. Admittedly this sounds easier than it is in practice. Personally I've found that in-memory coarse-grained tests more akin to integration tests, that test from the outside in are helpful and easier to maintain because they tend to be less concerned with the how. I can then choose to write finer-grained unit tests where appropraite
Re:Test-Driven Development is Stupid by mabbo on Thursday November 26, 2015 @06:59PM (#10635259)
Agreed! A code base I recently inherited (and exorcised) contained unit tests with roughly 90% coverage... And not a single assert. They didn't understand the idea of testing behavior, they just copied the implementation as tests.

I reduced 20,000 lines of tests to 5,000, and caught a dozen bugs.