[SailfishDevel] How to use QtTest?

Putze Sven sailfish.os at hardcodes.de
Tue Dec 31 14:38:15 UTC 2013


Hi there,

I am still in the process of "how to organize projects" in such a way that I want to make sure that they don't turn out as a maintenance nightmare and I can add other platforms in future. One topic of this is building the "business logic" as a library and create a test project for it. So far so good.
Now I have tried to use QtTest and got an underlined error using

 #include <QtTest>

in a header file. The corresponding

CONFIG += qtestlib

in the .PRO file leads to an unknown module(s) in QT error.
Ok, the module is not part of the SDK, just install it in the Mer SDM virtual machine.

But there is a module called qt5test installed, yet missing any header files. There is a qt5test-devel package. That brings header files but sounds more like "I want to develop inside a qt library".
Right now I don't see the wood for the trees, can someone show me a direction? :-)

Thanks,
BR.
Sven

P.S.: Writing separate business logic and tests for it seems to be interesting in general: why would I want to run it on the phone (emulator) the whole time?


More information about the Devel mailing list