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

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Fri Sep 28 11:28:52 CEST 2012



On Fri, 28 Sep 2012, Reinier Olislagers wrote:

> 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?

It is common to NNNunit testing frameworks.

Michael.



More information about the fpc-pascal mailing list