These projects are retired. The development has stopped and we don't provide support for them anymore.

screenshots

console screenshot

[ link opens a new window - 7kb ]
text runner

gui screenshot

[ link opens a new window - 25kb ]
gui runner

gui preferences screenshot

[ link opens a new window - 17kb ]
gui runner - preferences

gui project properties screenshot

[ link opens a new window - 21kb ]
gui runner - project properties

QtUnit

Software development testing framework
GNU General Public License (GPL)

overview  |  download  |  changelog  |  mailing lists  |  issue tracker

QtUnit is a unit testing framework for c++, originally based on CppUnit 1.5 written by Michael Feathers. All code has been refactored and ported to exclusively use Qt 3.x as it base library. This makes it highly portable to all the platforms supported by Qt, without compromising on the advanced features that are currently expected from modern software (Qt is a trademark of Trolltech AS).

The core sources have been organized into three distinctive parts :

Test cases can be grouped into test suites, which in their turn can be compiled into independent modules which are stored in shared libraries (.so, .dll, ...). This makes it possible to minimize the files that have to be recompiled when the sources for the test definitions change. Projects can be defined in XML files (visually in the gui test runner) to group an arbitrary number of modules together. When a module file is being added to a project, an additional base path for the test sources can be provided. During the reporting of failures, this path is prepended to the source filename in which the error occurred. An external editor can then automatically open the correct file on the correct line number to identify a failed test immediately.

The gui test runner has the ability to automatically reload each module after modification before the tests are run. This makes the development of test cases very iterative and interactive, without ever having to leave the gui application. Naturally, the same project files are also understood by the text test runner with analogue features for error reporting.

Thanks to the layering of all functionalities, working with projects is optional and it is very easy to create standalone test runners which embed all the required test cases, just as is has been done traditionally in CppUnit.

All the code is fully internationalized and already available in English, Dutch and French. Translating into other languages is very easily done through the use of the Qt Linguist tool.

The entire framework compiles into a shared library that can be used to create the actual implementations. The distribution contains examples of a typical text runner, gui runner.and standalone runner