472,993 Members | 3,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

version 2.0 of C++ Unit Test Library released!

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

Jul 18 '07 #1
1 1750
On Wed, 18 Jul 2007 11:23:26 -0700, rich_sposato wrote:
>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.
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: newbiecpp | last post by:
I am looking for a C++ unit testing program. I googled and found there are quite a few there, such as CppTest, C++Test, and DejaGnu. Can someone give me a recommendation among these programs? I...
16
by: Greg Roberts | last post by:
Hi I want to place the tests needed in the code using attributes. There seems to be enough code snippets around for me to cover this. e.g. // Test cases, run these here on the function and...
3
by: | last post by:
I am working on a web/webservice application that has a service layer. Most service methods will perform an access-check before executing. This check uses the IPrincipal credentials available in...
1
by: Viviana Vc | last post by:
Hi all, I have "Visual Studio Team Suite" subscription and now I started to play with Visual Studio 2005 for creating Test Projects. The thing I am interested in is the "unit test". I tried...
5
by: shuisheng | last post by:
Dear All, I was told that unit test is a powerful tool for progamming. If I am writing a GUI code, is it possible to still using unit test? I have a little experience in using unittest++. But...
1
by: Richard Lewis Haggard | last post by:
We're using VS05 and today the units tests have stopped working in our development environment. I'm sure that it is something really silly and simple but I'll be darned if I can figure out what it...
6
by: Vyacheslav Maslov | last post by:
Hi all! I have many many many python unit test, which are used for testing some remote web service. The most important issue here is logging of test execution process and result. I strongly...
20
by: earthwormgaz | last post by:
Hello, I'm after doing some C++ unit testing, I'm using CppUnit. I like the look of RudeMocks, but it doesn't work for Solaris/Sparc, so its no good to me sadly. So, I have class A, and it...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
I was wonder if there is any protocol or suggestions on how to setup unit testing projects in large solution??? If you have a large solution of say 50 projects and add a project for every unit...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.