top | item 40012260

(no title)

rowls66 | 1 year ago

I think whats more harmful than unit tests are code coverage metrics for unit tests that devs feel compelled or are required to achieve. The easiest way to achieve code coverage goals for tests is to write lots of small tests that test individual methods, but test very little of the interaction between them.

I feel that the goal of unit testing should be to test the largest unit possible without requiring external dependencies. In the language of domain driven design, this means to test the domain model. If you can get extensive coverage of the domain model as a whole, system tests can be used to test the complete system.

Alas, I have seen very few software systems with high quality domain models. It is not an easy thing to achieve.

discuss

order

No comments yet.