version 2.0 of C++ Unit Test Library released!

R

rich_sposato

I released version 2.0 of C++ Unit Test Library. You can download
it from SourceForget.Net at http://sourceforge.net/projects/cppunittest/
..

I wrote this unit test library because other unit test frameworks
always lacked features I considered important. Some only provided
output in certain formats, and I had no easy way to choose my own
format. Most provided no protection against exceptions. Only a few
were useful for unit-testing at exit time. Several were useless if the
host program crashed during a test since they provided no output. Not
a good experience overall.

I wrote down what I considered essential features for a C++ unit test
library, and what considerations should influence the design.


Important Features and Design Considerations:
1. Configurable output options for output types provided by library.
Also allow host program to receive notices about test results so it
can send results to other output formats.
2. Handles exceptions that occur in unit tests - and even allow host
program to test functions where exceptions are expected for some
input.
3. Provides strong exception safety for all internal operations, and
protects itself from exceptions thrown within host program.
4. Has 3 levels of test severity (warning, checked, required). If a
required test fails, the program ends. If a warning fails, the failure
is logged, but the unit test still passes.
5. Can send output to stdout, stderr, text file, xml file, and html
files simultaneously.
6. Can send text messages directly into output.
7. Host program can group tests together.
8. Provides summary table of all tests.
9. Can exercise unit tests even as program exits.
10. Library should be easy to compile, easy to setup within a host
program, easy to add new tests, and easy to parse test results. New
users should be able to learn how to use library quickly.
11. Objects within library should never break class invariants. Also,
library should provide accurate output even when host program
crashes.
12. Source code should compile as cleanly as possible with at least 2
different compilers, and behave the same no matter which compiler is
used.
13. Library should have as tiny a memory footprint as possible.
14. Big-O complexity of each function should be as small as possible.
The unit-test library should not degrade runtime performance of host
program.
15. Library should allow for long-term tracking of test results. (It
does this by adding overall test result totals to a "main" html page
as well as to the html page for the current test results.)
16. Independent Library should not rely on other libraries, only
functions and classes mentioned in the C++ Standard.


Please let me know if you want other features in the library, or have
other design considerations which may improve the unit test library. I
would also appreciate feedback on the overall usability and usefulness
of the library.

Cheers,

Rich Sposato
 
R

Roland Pibinger

I released version 2.0 of C++ Unit Test Library. You can download
it from SourceForget.Net at http://sourceforge.net/projects/cppunittest/ [...]
Please let me know if you want other features in the library, or have
other design considerations which may improve the unit test library. I
would also appreciate feedback on the overall usability and usefulness
of the library.

Provide at least a minimal Project Web Site (at SourceForge) that
depicts the 'look and feel' of your library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top