3 ms·
> Only write necessary tests — specifically, tests whose estimated value is greater than their estimated cost. Definitely. Ensuring that basic functionality wo
by lytefm 4y ago
> Only write necessary tests — specifically, tests whose estimated value is greater than their estimated cost.
Definitely. Ensuring that basic functionality works and that no awful regressions are introduced, using high-level tests (e2e, integration, based on realistic test data) is great. Such tests allow to refactor refactor with sufficient confidence.
Having hundreds of tests for trivial functions that might not even be relevant in day to day use for most customers which need to be rewritten or thrown away when refactoring - not so much.
- drewcoo 4y agoWhat tests are "necessary?" > no awful regressions are introduced What are those? > with sufficient confidence How much? > Having hundreds of tests for trivial functions If you can have _hundreds_ of tests for trivial functions, either the tests are redundant or the functions are not trivial. So which is it? How do you communicate what you think you know to neophytes on the team other than very lossy generalizations?
- lytefm 4y agoWell, the answer to your question would always be "You (or the responsible person in your team) needs to figure this out". I'd love to have some very clear rules and metrics as an answer, but I doubt that there are any.