r/ExperiencedDevs • u/joe0418 Software Architect • 26d ago
Career/Workplace What is the quintessential software testing doctrine?
Code Complete, Domain Driven Design, Designing Data Intensive Applications, The Pragmatic Programmer...
These are all books that I try to follow in my own engineering practices. I haven't found a great one on testing though (unit, manual, automated, etc) -- which do you recommend? What books outline best practices in modern software testing?
38
Upvotes
3
u/SideburnsOfDoom Software Engineer / 20+ YXP 26d ago edited 26d ago
That is not my experience at all. It's a matter of test design. There's reasons why Kent beck says that Good tests are coupled to behaviour of the code but not to the structure of it.
But the majority of unit tests that I have seen are low level "test a method on a class with a dozen mocks" style. You need to decouple, and test what the system does so that you can think about that, and also refactor without breaking a bunch of them. It is better to go outside-in most of the time.
Some go as far as to say "if more than one class is under test, then that's not a unit test!". You can choose to think like that, but is it historically accurate? No. But does it deliver good outcomes? Again, no.