Automated Qt testing framework

frameworksqttesting

Can someone recommend a good robust "Free" testing framework for Qt?

Our requirements:

  1. Should be able to test basic mouse click / mouse move events
  2. Should be able to handle non-widget view components
  3. Should have "record" capability to generate test scripts.
  4. Should be automatable for running it daily.

We looked at:

  1. Squish – this solves all our problems. But it is just too da** expensive.
  2. KD Executor – the download page now links to the squish page and says that's what they recommend for testing. Not sure what they mean by that.
  3. TDriver – from nokia.qt. Super difficult to install. Very little documentation. Having a hard time to just install. I wonder how much harder it would be to write tests.
  4. qtestlib – Could not handle non-widget components. Everything has to be a widget to be tested. No "record" feature.

Can someone help with any other alternative?

Best Answer

We use the builtin QtTest - basically a cppunit clone like all the others, but understands signals/slots so can mockup gui interaction..

It's not as automated as googletest, you need to explictily include the tests into a main.cpp and run that rather than it pickign them up from a directory, and there is no pretty testrunner - just the stdout from main.cpp

We haven't used it to test a lot of gui interaction directly (yet) - mostly just as a unit test tool

Related Topic