Email: info at
Phone: +61 3 9479 3988 (Don) +61 0425 784 187(Paul)
Fax: +61 3 9479 1675
Suite 3B La Trobe R&D Park,
2 Research Ave, Bundoora Vic 3083, Australia

DUnitWizard plug-in for Delphi

Latest version (3.0)
New features

Download (730Kb)

Online documentation

Updates & Support
This Delphi 5+ OpenTools API plug-in provides support for the creation of DUnit projects and test cases. DUnit itself is a separate product and installation, and must be installed prior to compiling projects created by this plug-in.

Uninstall any previous versions of the wizard and ensure that Delphi is not running. Download the software via the link above, then unzip and run the self-extracting setup program.

You have the choice of installing binaries and/or source for Delphi 5, 6 or 7. The binary package will be installed in $(DELPHI)\Projects\Bpl, and the documentation, licence and source code for the package will be installed under the directory you choose in the setup program. The setup program makes a registry entry in Delphi's design-time package list, so the wizard will be active the next time you start Delphi.

This wizard makes use of OpenTools API features only available in Delphi 4 or later, so can't be compiled for earlier versions of Delphi.

Latest features

New in Version 3.0:

  • Parsing of current IDE module to extract test class and method declarations

  • The TestCase dialogue of version 1 and 2 has been replaced by two new dialogues:

    • A TestModule dialogue with treeview displays of all classes declared in interface section of current IDE unit and corresponding test classes. Click checkboxes to enable/disable generation of corresponding classes, methods etc in a new test unit.

    • A TestClass dialogue. Place the text cursor inside a class declaration (anywhere in the current IDE unit). This dialogue shows treeview displays of the selected class and corresponding test class. Click checkboxes as above to tailor the output. The output class declaration is copied to the Clipboard so you can paste it wherever you choose. This allows addition of new test classes to existing test modules, or placement of test classes within the subject class's unit to allow testing of private methods.

  • Enhanced Options dialogue to allow tailoring of test class and test method names and preselected treeview nodes in TestModule and TestClass dialogues.

  • Documentation. I have written fairly comprehensive docs for the wizard
    which are available online, or from the 'Documentation' item on the DUnit menu in the Delphi IDE, and also from the DUnitWizard program group in the Windows 'Start' menu. The format is framed HTML.

Known bugs:

  • There are no known bugs with the plug-in, but there are several Delphi IDE quirks you may encounter:

    You will not be able to add projects to a freshly-created project group or to Delphi's default project group. Saving the group is not sufficient. You must close and then re-open the project group.

    Whenever you create a new test project, an error dialogue will pop-up saying there is no associated .RES file. Just close the dialogue - a default .RES file will be created. I haven't got around to creating a default .RES file which would stop this dialogue appearing.

    You may encounter AVs when opening or closing Delphi for the first time after installing the plug-in. Please email me if this persists.

    You may also encounter errors when building from source (particularly in D5). Remove the DUnitWizard from the design packages list (MainMenu|Project|Options...|Packages|EPC DUnit Wizard|Remove) before building from source. if you do a ' Build All' for the projects in the DUnitWizard project group you may see messages about missing methods or package entry points, or a missing run-time package. It's seems to be timing-related. (Delphi's internal state can't keep up with the compiler). Compiling, rather than building, each target manually gets around this problem.

Copyright © 2001-2003, The Excellent Programming Company