FPCUnit GuiTestRunner needs interface to be enhanced
Original Reporter info from Mantis: CCRDude @ccrdude
-
Reporter name:
Original Reporter info from Mantis: CCRDude @ccrdude
- Reporter name:
Description:
I want to enhance GuiTestRunner with actions to happen before and after a test is run (in my case, code coverage, see https://forum.lazarus.freepascal.org/index.php/topic,37186.0.html).
There are multiple approaches; calling pre- and post-processing in the main project file has the disadvantage that changes are not visible.
Making TGuiTestRunner.RunTest(...) virtual helps and means the test user simply has to change the form class in the main project file.
The best possible way would be a more flexibel interface with handlers. I "copied" the mechanism the IdeIntf uses for LazarusIDE, except that it had to be class methods here.
With the attached patch, any custom actions before and after RunTest(...) are possible, and there's a framework for more handlers if required.
The attached screenshot demonstrates this patch in use.
Mantis conversion info:
- Mantis ID: 32052
- Version: 1.9 (SVN)
- Fixed in revision: r56008 (#e934aeab)