I have a C++ project that doesn't use Qt. I am using Qt Creator as my IDE because it is very convenient.
I was reading about unit testing in Qt Creator here, and I think that Qt Test seems quite good. Is there a way to use Qt Test with my non-Qt C++ project?
Note that I have Qt libraries installed in my PC which I am using to program. But I don't want that the compiled program I release depends on the Qt libraries.
Also, a feature that I liked when I was using Visual Studio is that the tests are run automatically everytime I build my project. Can I do the same with Qt Creator?
By the way, if you can suggest another unit testing framework that I can use easily in Qt Creator, that's also fine.
You can also unit test (non-Qt) C++ code in Qt Creator with GTest:
https://github.com/google/googletest/
using this great QtCreator plugin:
https://github.com/OneMoreGres/qtc-gtest
I switched from QTest to GTest (for testing Qt applications) for several reasons e.g. haven a nice graphical output and the ability to use a mocking framework (GMock).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With