Back to Blog home

bye bye QtTestLib

Published on Friday September 16, 2005 by Harald Fernengel in Qt KDE | Comments

and welcome QTestLib. If you follow the Qt 4.1 snapshots, you might have noticed that QTestLib appeared as part of Qt. To ease transition, there's a small updater tool (qtestlib/updater) that updates old autotests to use the new library.

Especially after being adopted by KDE, QTestLib got quite some feedback. Unhandled exceptions are now added to the test output and error reporting will stop after 2000 warning messages to prevent hanging tests from overflowing your harddrive. There were some API cleanups, especially the testdata creation was simplified a lot:

void MyTest::myFunc_data()

QTest::newRow("someTag") < < "someData" << 41;
QTest::newRow("otherTag") << "moreData" << 42;

Note that the QtTestTable parameter is gone. With a "using namespace QTest" declaration, it's even less to type :)

Subscribe to Our Blog

Stay up to date with the latest marketing, sales and service tips and news.

The blog comment system has been migrated to a new platform. If you face any issues, please let us know via