|
|
|
|
|
by finaliteration
2986 days ago
|
|
I just updated our “best practices” documentation to include the recommendation that tests be written against a public API/class methods and the various expected outcomes rather than testing each individual method. I think the latter gives an inflated sense of coverage (“But we’re 95% covered!”) but makes the tests far more brittle. What if you update a method and the tests pass but now a chunk of the API that references that method is broken, but you only happened to run a test for the method you changed? I like to think I’m taking a more holistic view but I could also be deluding myself. =) |
|