DUnit Scalability, or lack thereof

At work, we use DUnit for our unit testing needs, but we have noticed that the GUI test runner is not very scalable at all. Right now, it takes around 60 times longer to run the tests from the GUI than it is to run them from a command-line test runner. To address the problem, I have replaced the TTreeView in the GUITestRunner with a Virtual Tree View, which makes a huge difference in performance.

In some simple testing scenarios, here is a comparison of performance. All of the tests simply contain

CheckTrue(True);

Running 1,000 tests:

  • GUITestRunner: 25 seconds
  • FastGUITestRunner: 2 seconds

Running 10,000 tests:

  • GUITestRunner: 4 minutes, 13 seconds
  • FastGUITestRunner: 17 seconds

As you can see, the DUnit test runner does not scale very well, and pleasently my new test runner seems to scale much better. If you want to take a look at the code, you can find it here.

One Response to “DUnit Scalability, or lack thereof”

  1. Ted Says:

    I’m really interested in trying out your code. I’m having some trouble just dropping it in to DUnit. What version of DUnit is your FastGUITestRunner written against? Perhaps you could post the entire DUnit folder as an archive? Thanks so much for the great improvement!

Leave a Reply