3 ms·
I'm curious... I can see the obvious value of having a testcase for a class of bugs, but a testcase for a particular bug instance which was already fixed earlie
by jnurmine 8y ago
I'm curious...
I can see the obvious value of having a testcase for a class of bugs, but a testcase for a particular bug instance which was already fixed earlier does not seem right, so I probably misunderstood something.
How often do the tests find a problem?
When it does find a problem, doesn't this mean that one hits a bug which existed before?
Can you give an example of a case when the test was useful?
- nhoe98thnuoe 8y agoThis is known as regression testing, and it's extremely useful. For example, you find some bug where, say, a calculation produces a nonsense result. You fix it, then add a test for what you just fixed. 2 years from now, someone refactors the code and reintroduces the bug because their refactor didn't take into account all of the possible input cases. Your test now catches it. Our regression tests have literally found hundreds of bugs over the years and saved us a lot of time and embarrassment.
- jnurmine 8y agoThanks. Of course. I see what you meant now.