When and When Not to use a Test harness
I have read (pronounced "red") the FAQ on Testing harnesses, and while I have a good idea (i think!) of what one is, still would benefit (as I'm sure others would) from a discussion about when it is appropriate to have something as robust as that as part of your testing framework.
Any help would be appreciated,
Re: When and When Not to use a Test harness
A test harness can be anything from a simple driver to a comprehensive development environment like JUnit. The best way to use this concept is when you establish up front how you validate your code, as in test-driven development. This is also pursued in Agile development as test-driven design, but I am not a great fan of that yet (my take is that I want to see some results before I believe it). My point is, I can give you opinions but not rules for when to use a test harness.
The ideas are not new: you write a module such as a function or subroutine, as usual, based on your specifications. You write a mainline module that calls the function/subroutine and validates the results. Any environment (common elements, etc.) provisions are part of that mainline, as are any dependent modules (often implemented as stubs to provide known values to the module under test). A developer can thus validate the code as it is written, so the result should be a much cleaner module. Because you can feed the process with as many tests as you want, the overhead of testing during development is kept to a minimum.
Many formal test harnesses are based on JUnit and you can get many for free from download sites. It nicely bridges the gap between unit testing and systems testing, allowing testers to provide test cases as early in the development process as is practical, and you don't have to invent a thing if you use a language for which there is a proper version already developed. So, the only concern about using this approach would be if you had to create your own test harness and a simple driver process turns out to be insufficient. In general, I would try to employ every available tool to get the testing done as early as possible in the SDLC.