Testing is a very important and necessary part of software development. Even though many people consider it to be an essential part of the process of development, testing is often overlooked. This is mainly due to the fact that testing is generally considered boring and tedious. However, there are many tools to help reduce the pain that is normally included with testing. Some tools help test individual units (or parts) of a project, cxxTest is one such tool. There are also debuggers, such as gdb that may aid in the process of fixing the errors found while testing.
Unit testing, as it is called, is one popular way to test software. Unit testing infers that each "unit" or part of the source code is tested individually. Normally, unit testing is an easy form of testing when the object oriented programing discipline is in use. When many "objects" exist, it is easy to test these parts individually. Another form of testing (referred to as regression testing), tests older parts of a program after a new part has been introduced. When new features of a program are introduced, they sometimes conflict with previous functions. Regression testing tests to ensure new parts of a program comply with the other, older parts of a program.
CxxTest is a unit testing framework that attempts to reduce the amount of tedious work needed to properly test a program. It does this through the use of automation. CxxTest uses an automation script to generate an intricate set of tests from the simple header file written by the tester. The automation script makes the time required to write tests much smaller, this is due to the fact that the automation script deals with the complex requirements to write an effective test. The user is able to write the tests in a rather simple format.
There is a slight learning curve for the proper use of cxxTest. However, once you are able to utilize it properly, the time required for testing will be greatly decreased. One thing that I would have liked to know, is the fact that cxxTest doesn't rely upon shared libraries. This means the files required for testing are highly portable, and can be moved around from directory to directory with no problems. One just has to make sure the file path of the automation script in the makefile is correct.
Testing, an often overlooked part of the development process, is a very important process. Many people delay testing their project until they can no longer avoid it; by this time, it is often too late to easily fix an error. Testing should be involved at every step of the development processes, enough to the point that it becomes second nature.