3 ms·
> You wrote: >> if you created 10 magnetised needles using the wrong process and getting the wrong result, then all 10 would agree with each other and your tes
by lelanthran 2y ago
> You wrote:
>> if you created 10 magnetised needles using the wrong process and getting the wrong result, then all 10 would agree with each other and your test passes
You snipped out the qualifier to the paragraph. The qualifier is important. Here's the full quote with the qualifier:
> Using this analogy, if you created 10 magnetised needles using the wrong process and getting the wrong result, then all 10 would agree with each other and your test passes, but your needle is still broken.
IOW, using this analogy for software development, all the products created with the wrong algorithm and/or process would all agree with each other. It's why I say you are missing the point.
You're not creating a binary product that either exists or doesn't exist, like magnetism, so repeating the process as some sort of "test" is a broken way to test.
It's also the most popular way to write tests: the tests are effectively moot because a pass does not indicate that the result is correct.