On Tue, May 19, 2009 at 3:06 PM, Dean Zobec <[email protected]> wrote: > The Setup and Teardown run only once for a set of tests goes against the > philosophy of unit testing actually, as violates the priciple that all > the unit tests should be independent from each other.
The tests in tiOPF are independent of each other, but running some 800+ database related tests where each one creates and destroys a DB connections causes the tests to slow down by a *huge* magnitude. The "SetupOnce" and "TearDownOnce" was introduced in DUnit2 to setup and destroy a DB connection per persistence layer (ADO, Oracle, etc.) and greatly increased the time required to run all the tests. I tried to accomplish the same with the TestDecorator, but with a nested test hierarchy (4 or 5 levels deep), TestDecorator doesn't behave as expected and the "SetupOnce" and "TearDownOnce" never got fired. I tried to hack the test suite to get most of the tests to run, but as the unit test output shows, by hack causes other issues and is not a real solution. > I'm sorry but I have no spare time at the moment to participate in any > serious development process, so I can only take a look from time to time Thanks for popping though. :-) Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
