3 ms·
> In most businesses, the only tests that have business value are those that are derived from business requirements. This is, imo, the most important takeaway
by luord 9y ago
> In most businesses, the only tests that have business value are those that are derived from business requirements.
This is, imo, the most important takeaway and it is, or should be, obvious, but it often isn't (maybe because "common sense is the least common of senses" or something like that). It's also what I strive for, with one caveat[1].
> One is to use it as a
learning tool: to learn more about the program and how it
works.
Another great takeaway. Good tests should work as documentation, imo. I consider this another test quality metric, even: If looking at the tests only confuses me further, those tests need to be changed (and the code they're testing too, most likely).
[1]: Striving for this can turn code coverage into an useful metric. Not of correctness, of course, but on how much code we're writing that doesn't solve a business requirement. That code should be refactored away to separate libraries or replaced with third party libraries that already do that. I'm firmly in the "avoid NIH" camp.