Unit Testing in Qt Applications
summary
QTestLib is a lightweight C++ unit test framework shipping as standalone executables with data‑driven tests, GUI event simulation (key/mouse, QTestEventList) and helpers like QSignalSpy and a QTestEventLoop; command‑line XML/verbose output and an X “sepher” display isolate noisy widgets. Memory debugging uses valgrind and mudflap; internal numbers: ~6,000 lines of test framework code and about 7,000 unit tests run nightly, catching leaks and regressions (examples show 84/59 passed runs).
AI-written summary · about
chapters (29)
- 0:00Intro
- 1:35Contents
- 1:58Definition of Unit Testing
- 3:13What is it?
- 5:46Hello World
- 7:25Boring work
- 7:49Build it
- 11:28Macros
- 13:13Our little test extended
- 13:39Data Driven Testing - Example
- 14:09Test Data
- 14:44Implementation
- 16:01Benefits of data-driven testing
- 17:16GUI Tesing
- 18:27Keyboard entry simulation
- 21:11Mouse simulation
- 22:34Canned events
- 25:15Expect Fails
- 27:36Skipping
- 28:20Verbose reporting
- 31:45QSignalSpy example
- 33:56QTestEventLoop example
- 35:26Sleeping and waiting
- 36:20Command line arguments
- 44:31The Tools
- 46:13Typical Problem
- 50:12Mudflap output
- 51:47Uninitialized Memory
- 52:37Summary
