Installing vbUnitFree


  1. vbUnitFreeTestRunner - the ActiveX EXE that runs the tests.
  2. RunVBUnit - the command line exe, used for quick testing when the green/red indicator might not be needed or for use in batch files when testing large parts of a system.
  3. vbUnitFreeAddIn - VB IDE Add-In that lets you run you tests in the IDE.
  4. vbUnitFreeSampleTests - a sample Dll that can be used to learn how to use the testing tools. Contains working and failing tests that demonstrate the full behaviour of vbunitfree.

Binary install

  1. Download the distribution
  2. Extract the distribution to a suitable place.
  3. Use the batch file to register the components.
  4. Add the location of the RunVBUnit.exe file to your path, so that you can easily run it from the command line and in scripts.


  1. Get the latest source from cvs.
  2. Check that you have vbUnit3.dll registered on your system.
  3. Compile in the following order, respecting the usual COM rules when it comes to binary compatibility. If you have a major change to make, submit a patch so that future distributions contain any fixes that you've made.
  4. vbUnitFreeTestRunner.vbp
  5. RunVBUnit.vbp. This either needs to be compiled using something like Matt Curland's VB6 Console Application add-in, or hacking the resulting exe using some other means. See the resources section.
  6. vbUnitFreeAddin.vbp. Fully functional version. There are still a few features that it would be nice to have here, like shortcut keys to run the tests.
  7. Try running the vbUnitFreeSampleTests project.
^ Top

Writing Tests

^ Top


Creating Console applications with Visual Basic 6

There are others as well, but basically it involves altering a flag in the Portable Executable File format, showing that this is a Console application rather than a GUI application.

Further Reading

^ Top