Installing JUnit 4.4 on Mac OS X
March 3rd, 2008
“Installing” is a little misleading—since JUnit is a jar file, you aren’t really installing anything… you’re simply putting it somewhere.
The trick is to let java and your system know where to find JUnit.
Read the rest of this entryExhaustive Testing Is Impossible
February 14th, 2008
Let’s assume that testing your software is good. We’ll assume that you are working on a larger project, or as part of a team, so we want to test the code. Great. There we are.
Something to keep in mind is that exhaustive testing is not possible. This is not provable, and it would not be true if it were provable.
If it were provable, that would mean that you could locate everything testable within the software, and demonstrate that tests could not be written for all of them. But if it’s possible to locate everything testable within the software, then it must be possible to write tests for all of them.
Of course, showing that something is not provable isn’t the same thing as showing that it’s true… but let’s assume, just for fun, that exhaustive testing is not possible. I mean, exhaustive. Nothing left out. Nothing left untested. No input, output, or circumstance un-foreseen and un-tried. Impossible.
So there will be some things that are not tested. Whatever you don’t test probably has a bug in it, somewhere. That’s also unprovable, and a little bit cynical. It’s also a bit of a tautology. If we assume that all software has bugs (cynical? realistic), we know that the bugs are not in what you tested, because if they were in what you tested you would have found and corrected the bugs. So, said bugs (of whose existence we are confident) must be in the areas which you didn’t test.
Of course, if you’re going to do tests at all, you want to test everything you can; you want to at least attempt to be exhaustive, within reason. Good deal; your manager will be very happy.
For the record, I do think test-driven development is a Good Thing, and that it will probably ensure that, at the very least, your core concerns (whatever you had the foresight to test) will work properly.
But you’ll know that you haven’t tested everything. Because you can’t have tested everything.
