[fpc-pascal] FPCUnit - parallel test suite execution

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Thu Mar 19 14:26:42 CET 2015


Many thanks for your comments.

On 2015-03-19 10:56, Jonas Maebe wrote:
> I.e., simply run multiple self-contained unit-test programs in  
> parallel,

Based on the projects I work on that has unit testing, that doesn't seem
like a feasible option. It would require a lot of work, not only
splitting the test suites, but also compiling all of them etc. Plus the
fact that Lazarus IDE still doesn't support Project Groups, it makes
working with multiple related projects very tedious.

> tests sequentially and the results are all written to separate files.  
> At the very end, all of those text files are concatenated in the right  
> order, so the output is deterministic.

This is actually what I had in mind for a single test program. Test
suites that run in parallel will return a TTestResult object. The main
program will then collect all those results at the end of the complete
run and present it in some good manner. Sounds simple enough. ;-)

DUnit2 and FPTest (my Free Pascal fork of DUnit2) already support an
interface for repeating tests. Creating parallel tests could be handled
in a similar fashion. I'll have to review the FPCUnit code a bit more to
see what would be needed.

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list