[Qt-interest] QT

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Jan 8 18:00:07 CET 2009


Srdjan Todorovic wrote on Thursday, January 08, 2009 12:26 PM:

> ...
> Qt4 has a test framework, but I'm not familiar with it, and not sure
> if it can do GUI testing.

The Qt4 unit test framework can "simulate" mouse and key events:

  http://doc.trolltech.com/4.4/qtestlib-manual.html: "Basic GUI testing:        QTestLib offers functionality for mouse and keyboard simulation."
  http://doc.trolltech.com/4.4/qtestlib-tutorial3.html

So in theory you could programatically setup a GUI test (good luck when you change the GUI implementation ;).

In practice however it is certainly *way* more convenient to use dedicated tools such as the mentioned Squish and KDRunner ;) They can also better cope with renaming GUI elements or moving them around in the GUI object hierarchy (for example should you all of a sudden decide to put a QPushButton into a newly created QGroupBox), without changing all your existing GUI tests.

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




More information about the Qt-interest-old mailing list