~/talk

Quickly and Effectively Testing Qt Desktop Applications

Talkat QtDay 2020 · 2020-11-16..11-19· [testing]
slides:none on file

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

  1. 0:00Introduction
  2. 4:10Testing legacy Qt apps
  3. 7:44Restructuring code for tests
  4. 13:25Testing widgets with Catch2
  5. 22:44Separating model and UI
  6. 29:45Common Qt testing pitfalls
  7. 35:14Approval tests for Qt
  8. 41:58Key testing principles
  9. 43:40Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.