4 ms·
In either case, I think my main point is still true: if you need to have so many test cases for such a simple program, you'll never finish performing all the te
by greenyoda 10y ago
In either case, I think my main point is still true: if you need to have so many test cases for such a simple program, you'll never finish performing all the tests for a real-world program. If you're testing someone else's program, you'll need to pick a manageable number of test cases that have a high probability of finding the errors. How likely is it that the programmer who wrote this code tests side "a" for being less than or equal to zero, but only tests side "b" for equal to zero and doesn't test side "c" at all? As a tester, I'd assume that if the program catches bad input for one side, it would do so for all sides, and then move on to test other things.
- CarolineW 10y agoI deduce that you've only worked with a limited type of programmer. I have, indeed, tested code written by people who did not do as you suggest. That being the case, I wrote code to produce all the test cases, including all the permutations of the elements. In this case I would produce three numbers in non-decreasing order, and then output all six permutations of them. I write safety-critical software, and I test safety-critical software written by others. I fully expect all of these cases to be tested, including feeding the program with non-numeric values, negative values, junk, and floating point numbers that are equal under various levels of precision. If you're not doing this, you're deliberately choosing to sacrifice the program's quality for your time and effort spent testing. That's a choice you can, or course, make, but you should be very clear to yourself, if not your users, that you're doing it.
- ColinWright 10y ago> I deduce that you've only worked > with a limited type of programmer. More technically, you abduce that. https://en.wikipedia.org/wiki/Abductive_reasoning https://en.wikipedia.org/wiki/Abductive_reasoning