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

Reinier Olislagers reinierolislagers at gmail.com
Fri Sep 28 11:25:08 CEST 2012


On 28-9-2012 10:43, Graeme Geldenhuys wrote:
> 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.

Ah, Listeners.... thanks. Is this listener concept something that's
common to more xunit frameworks (junit... etc) or is it an fpcunit
invention?

Going to dive into the fpcunit code then. Glad I asked ;)




More information about the fpc-pascal mailing list