Software Testing
I think we need to make some changes to the way we test our code.
Unify server tests
We're testing our servers using a jumble of techniques. All of our servers except FreeForm have to be installed in order to be tested (well, some lack tests...). We should rewrite all of the server tests so that the handlers (which will become
handler in version 3.5) are tested without actually installing a complete server. The simpler text responses are easy to test this way (take a look at how the FreeForm server tests work). The data responses are harder, but
geturl has a new feature that enables it to read the data response from
stdin and spit out a text version; this text can be used in a test.
Summary: I think we should make all our server tests look like the FreeForm tests
except that we should use
geturl to filter the data response.
Unit tests
We should write unit tests for new code that's non-trivial (e.g., accessor methods are trivial). We should not write unit tests for old code
unless there's bug fix in a particular method. When we make a fix, that's a good time to write unit tests for that method.
- Use CppUnit for C++ unit tests (it works for both C++ classes and collections of functions). Look in src/dap for examples (files with the name DDSTest.cc --> unit tests for DDS.cc).
--
JamesGallagher - 15 Sep 2003