On 23 mei 2006, at 12:27, Graeme Geldenhuys wrote:

Yes much faster!  I just finished a case in point on our code.  One of
our developers (new to unit testing) used the Setup and TearDown
methods in a TestSuite to setup a db connection, do a test and close
the connection. Over and over and over.  The 27 tests took over
30seconds to execute.

I relocated the db connection code to a test decorator (part of
fpcUnit and took 15 lines of code to implement) and now it creates a
single connection for the lifetime of all tests in that TestSuite.
Time to run those 27 test are now 1.9 seconds!

I can't see how something like this is possible with the way the fpc
team does testing.

Our output is simply redirected to a file. This file is later parsed and committed to the database in one go using another program (well, actually it's uploaded to www.freepascal.org, where a program does this parsing and committing).

The main cause of slowness when running the fpc test suite is the thousands of compiler, assembler, linker and test program invocations (assembler and linker only on platforms without an internal assembler and/or linker, obviously).


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to