Quickly and Effectively Testing Qt Desktop Applications
summary
Shows how to get tests into an untested Qt app fast by changing the build to produce a static library plus a test executable, using Catch2 with a QApplication main, and hiding widget fiddliness behind reusable fixtures. Demonstrates Qt helpers like QSignalSpy, recommends converting old string-based signals to pointer-to-member connections, and introduces ApprovalTests via ApprovalTests.cpp.Qt to verify widget state as TSV snapshots. Covers CI tips (-platform offscreen, guard tests when no display) and when to use Squish for full-app recording.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 4:10Testing legacy Qt apps
- 7:44Restructuring code for tests
- 13:25Testing widgets with Catch2
- 22:44Separating model and UI
- 29:45Common Qt testing pitfalls
- 35:14Approval tests for Qt
- 41:58Key testing principles
- 43:40Q&A
related talks
57mQuickly Testing Qt Desktop Applications with Approval Tests
58mIntroduction to Automated Testing for Qt Applications
25mTest It!
27mTesting Your Patience With Qt
25mHow to automate Qt GUI Tests
29mAre you testing enough - Qt application Quality Assurance
46mBehavior Driven GUI Testing of Embedded, Mobile and Desktop Qt HMIs
23mQt and Python; code easily using the Pytest framework
