Category: Testing

About unit tests with Qt and getting code coverage results


QT Testing 2 – a Warm Welcome for Code Coverage

It is the most sexiest part of testing for me. You’ve made some unit tests for your project but you don’t know how much of your code you’ve tested or “covered” 🙂 It is out of your control and you’re about to loose your sanity. At first gods have created Gcov , but with LCOV it is sexy, because it gives you graphical output with html results. It’s revolutionary!!! Project...


QT Testing 1 – Do you trust your code? Here is the mighty QTest

In first post of testing series I’ve mentioned about multiple targets as a starting point. Now it’s time to add a class to show testing utility. In main target let’s have a class called Calculations. Goal is to test this Calculations class methods. Project source code can get from repository. There is a class in Main_Target to test our code and cover it up. It’s time to have a testing...


QT Testing 0 – Creating Multiple Targets with CMake

At first, I was about to start 1st chapter and talk about QT’s Testing with QTest. My aim is to use CMake instead of QMake, so unimportant side of community has issues about CMake. This is why first I will talk about multiple targets and why do we need it for testing. Sample code is available on GitHub Unit tests are about testing the class, methods your code. but you...