PDA

View Full Version : QTestLib vs Google Test



tonka3000
19th July 2013, 09:23
Hy@everybody,

I want to include unit-testing in my applications. I have searched for a while an found two possible candidates - QTestLib and Google Test. I read many articles, tutorials etc. about the two frameworks but i can't figure out what's the best framework for my projects.

Here is what i know:

QTestLib:
Pros:
-) directly integrated in Qt, no 3rdparty-library required
-) simple and fast
-) basic gui-testing
Cons:
-) the teststructure is a little bit strange
-) is it good for non qt-based applications???

Google Test:
Pros:
-) fast and very simple
-) many features
Cons:
-) it is an 3rd-party library

Many people like goole test very much because it seems to be very simple and powerful.

So my questions are:
-) Can anybody tell me what is "better"?
-) Is it good to mix both in the same application?
-) Is QTestLib good for non Qt-based applications?

Please post your experiences here about QTestLib and/or Google Test.

I use Qt 4.7.3 in an x64 environment.

Thanks in advance
Tonka

tonka3000
19th July 2013, 15:55
I found an interesting post: http://stackoverflow.com/questions/1524390/what-unit-testing-framework-should-i-use-for-qt