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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to