Fog Creek Software
Discussion Board

Unit testing Visual Basic Programs

What frameworks do you use for unit tests in Visual Basic? I checked vbunit (2?), but could not get it installed. I lost confidence, when other people on the wiki reported the same problem.

Do you know of any alternatives?

Or should I learn the theory first, and then write my own framework?

Daren Thomas
Monday, November 3, 2003

COMUnit ( ) isn't bad, but it does require you to maintain an array of procedure names to use for testing, as VB doesn't natively support introspection.  Still, it seems to work pretty well.

(A colleague of mine here in Portland, Oregon has been working on a unit testing framework in Access that does make use of introspection, so COMUnit could probably have this capability added as well.  It just doesn't have it currently, which entails a small amount of extra work.)

Sam Livingston-Gray
Monday, November 3, 2003

My understanding is that ComUnit is for testing COM interfaces (which, I believe, includes CLASS interfaces).

Does that mean that this would not test procedures and functions  (which aren't in a class) ?

If so, how (or do) VB programmers automate Unit testing of Procedures and Functions that are not part of a Class?

(Only a small % of my code is in CLASSes)

Wednesday, November 5, 2003

*  Recent Topics

*  Fog Creek Home