Sales Pitch
Are you a C or C++ programmer? Do you need a simple way to test individual
functions and classes directly? Do you want a convenient way to run one or more of your
carefully crafted tests? Do you want the power of a testing framework, but you still want
to write your own main()?
If you answered Yes to any of the above questions, then oh boy do you need
TestingLite! For the low-low price of absolutely zero dollars (US), you too can own a copy
of TestingLite.
Testimonials
Not convinced yet? Just listen to these glowing testimonials:
"I have used TestingLite for over a year, and I sure do like
it!"
- Eric Runquist
"My experience with the TestingLite support crew has been
outstanding, usually"
- Eric Runquist
Pudding
I know what you're thinking, "Show me what it can do, you goofy
#&$#*@!". The proof is in the pudding, as they say, so here's a one-page demonstration of a complete C++ program
that uses TestingLite to do something useful.
What Seriously Kicks Ass
The TestingLite library has one extremely powerful feature for performing
"regression file comparisons". This feature makes it very easy to create tests
that involve output files. A test can call a single function, passing in the filename for
the "correct" output file, and the filename for the "actual" output
file. If the correct and actual output files both exist, and both compare equal, the test
carries on.
If the correct file doesn't exist yet, then the library assumes this is
the first time this test has been run, and prompts the user to: review the actual
output file, accept the actual output file (copy it), fail the test, pass the test, or
exit the program quietly. This amounts to a validation phase for a test.
If both the correct and actual output files exist, but they do not compare
equal, the library prompts the user to: review the differences between the two
files, accept the actual output file (copy it), fail the test, pass the test, or exit the
program quietly. This amounts to a regression phase for a test.
This protocol for dealing with the validation and regression phases of a
test is made extremely customizable via the following pluggins (plugged in using abstract
base classes):
file difference viewer (you can use your favorite differencing utility)
file viewer (you can use your favorite file viewer)
file comparitor (you can plug-in your own file comparison algorithm,
case insensitive, etc.)
user interation (you can specify how a user is prompted when a file is
missing or the files differ)
The source for this regression
file comparison facility is in its own directory in CVS.
The ProcessTest
sample uses this facility. First you must setup
the facility's defaults (note the CFileRegCompare class). Then, you simply instantiate the
CFileRegCompare class and call its Compare()
method (again, note the use of CFileRegCompare).
I could go on and on. I'm a tad proud of this little facility. The User Manual contains more on this topic.