[Qt-interest] Unit tests the Qt way

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Mon Dec 20 13:04:57 CET 2010


On 2010-12-20 Robert Robert Caldecott wrote:

> ...
> The latest Qt Creator (2.1 RC) has better support for creating test projects and they
> are also geared to a single test project per-class - which is significant I think.

>From http://labs.qt.nokia.com/2010/10/29/making-auto-testing-easier/: "For instance, if you are patching something in QGraphicsView, you should compile and run individually 19 different auto-tests..."

That was something I always wanted to avoid: I want to have ONE test *.exe which runs ALL tests defined for my project, or one test *.exe per DLL/shared library. And this test would then generate me a "nicely" rendered HTML page I could hook into some "continuous integration" system like Hudson, CruiseControl and the like.

That said, if the Qt framework would provide an easy to apply solution to handle/generate one test *.exe per class (and these test *.exe would also link against the actual shared library to be tested), like this "Qt Autotester", so if this is really The Way To Go(tm) then that would be fine as well.

But from what I understand the "Qt Autotester" is much geared towards Qt framework development itself, so it would need a little bit of tweaking to "read generic test *.pro files" :)

I'll post my own experience here with QTestLib as well...

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22





More information about the Qt-interest-old mailing list