5 ms·
Exactly this. Also in codebases where the authors seemed opposed to writing good comments, tests are extremely useful in documenting expected behavior in edge c
by crazygringo 4y ago
Exactly this. Also in codebases where the authors seemed opposed to writing good comments, tests are extremely useful in documenting expected behavior in edge cases, how an optional argument is supposed to be dealt with when missing, etc.
Not to mention that people are often a lot less rigorous with "manual testing" than they should be. They don't think of scenarios, they skip scenarios, because nobody's checking on them. While when you write tests, you're creating a permanent record where you can be held accountable if you miss something.
- pixl97 4y ago>They don't think of scenarios, they skip scenarios, Bane of my life. Me: "Hey, this big customer we're not going to tell to change their behaviors and pays us a lot of money is using this product in this particular way. We should put in a functional test case to ensure that we don't mess this up" Dev/QA: "Eh, no" This generally leads to a support call half a year later with the customer panicking, support groaning, and the developers panicking because they 'could have never predicted the customer using the application in this manner'.
- kraftman 4y agounit tests are comments that are forced to stay up to date and attached to the code they are for.
- hbrn 4y ago> in codebases where the authors seemed opposed to writing good comments, tests are extremely useful in documenting expected behavior in edge cases In other words, tests are useful in teams with awful engineering culture. I tend to agree, in my experience they are almost synonymous. If you treat engineering culture as weather (i.e. something you have no control over), then tests are a good tool to address your problems. > you're creating a permanent record where you can be held accountable if you miss something Bureaucracy is another word for it. You know who excels at it? Government. And you know what government is really bad at? Running business and innovating.