[fpc-pascal] Getting fpcunit test results into a database

Graeme Geldenhuys graeme at geldenhuys.co.uk
Fri Sep 28 10:43:45 CEST 2012


On 2012-09-28 09:18, Reinier Olislagers wrote:
> 
> Is there existing code available for getting fpcunit test results into a
> database?

No, but the Test Listener interface makes such an addition very easy.

Simply create a TDatabaseListener that implements the ITestListener
interface. It's only 5 required methods to implement. Then simply
register that test listener with the testing framework (via
TestResult.AddListener() call), and it will be fed test results as they
happen.

Each of those 5 ITestListerner methods will then insert records into the
database as needed.


Regards,
  - Graeme -




More information about the fpc-pascal mailing list