Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
22 March 2022
Do you unit test your application? If not, watch this episode to see how to set it all up. If you actually do write unit tests, then watch this episode to learn how to get the most out of Qt Creator when running your tests.
0:00 Intro
0:35 Qt's unit test framework compared to other test frameworks
1:21 Qt's unit test framework, test cases and QCOMPARE
3:49 Table driven testing
4:56 Including QTest vs. QtTest
6:08 QTEST_MAIN macro
7:18 Including "tst_basics.moc"
8:33 Qt Creator integration
11:51 Debugging tests from Qt Creator
13:21 CMake integration
Episode on separating application into library: https://www.youtube.com/watch?v=9-fSgD068vI&list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI&index=26
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/UnitTests
All QML tips and tricks videos : https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI