wxWidgets GUI initialisation requires a real wxApp based application.
Controlling the code flow in/of the wxWidgets GUI CppUnit tests requires overridding OnRun() and OnIdle(). The latter one serves the purpose of exiting the main loop which can be equated to flushing the event queue.
This class works closely together with WxGuiTestHelper which provides some convenience or helper methods to (a) configure the behaviour of this class (e.g. showing modal dialogs non-modal), and (b) facilitate the usage of some common features (e.g. flushing the event queue, or making the test temporary interactive for manual visual checks during GUI test implementation).
For the purpose of testing whole applications (denoted applications under test = AUT) at least wxApp's OnInit() and OnExit() methods must be forwarded or delegated to it.