In a previous post, I was discussing briefly which the best C++ unit testing framework could be. The economic benefits of succesfully applying unit testing are substantial after all. After careful consideration I have found two candidates: Google Test and Parasoft C++Test.
Google Test is a comprehensive unit testing framework covering almost everything anyone can ever need. Compared to other tools it is also rather easy to use it for writing test cases and test suites. It has a very active development community, not least since Google is using it for all in house C++ development. It also has a very attractive Â license, the New BSD License.
Parasoft Â C++Test has a commercial license and is a bit expensive. But it does have a very attractive feature. Using instrumentation it can record the actual behaviour of your existing “legacy code” and automatically generate sufficient coverage of that code. This will not tell you if the code is flawed but it will alert you to any unplanned changes in that behaviour.