Vb Unit

VbUnitThree (vbUnit3) is the latest automated regression TestingFramework for VbClassic version 6.

It is an extension of Brads work and offers many new features. The main enhancement is the use of reflections, which makes writing new tests as easy and as uncomplicated as writing them in JUnit or in Ruby. - BodoMaass

(If you're upgrading to VB.Net, see the 'DotNet' section of the TestingFramework page for several options.)


For more information see...

See also:
How is this different from VbUnitThree? I thought it was free too?
VBUnitThree is free for the basic version, you pay for the integration with the VB IDE.
You also pay for the full TextRunner? for VBUnitThree. You can use the VbUnitTwo version, but it's a little limited.


A question from the TestingFramework page:

"Can vbUnit be used to test COM objects?"

A: Yes, but it is focused on Visual Basic 6.

Also, VB6 can't actually use *all possible* COM interfaces. (But it can do "just about anything" you're likely to encounter.)


Q. Can you give pointers as how to build a COM object say in C++ that can be tested under VbUnit3? I built a COM object with IFixture interface and some test.. methods in C++. But it could not recognize the test... methods. In fact VbUnit failed with Error.

I think you'd have to implement IDispatch for COM "reflection" to work.

So you're writing COM components in C++, you want to write the tests in C++, and you want to use vbUnitThree to test it? Why?

I'd suggest that you try CppUnit. Also, try emailing BodoMaass directly. I happen to know that he put together a C++ testing framework that he uses quite heavily. -- JeffGrigg

I am in an environment where COM objects are built using VB as well as C++. I am trying to go for an integrated testing framework. BTW, as I mentioned, I implemented a COM object with IFixture interface. I believe IFixture is derived from IDispatch. Anyways, my C++ COM object implements IDispatch. VBUnit seem not to like the COM object. I am trying with ITest and VBUnit seems to like the object lot better. But again I need to put in the tests under Run() method and lose the reflection of running any test... methods.

Are these COM objects being built with type libraries? And do you have tlbinf32.dll on the test machine? The Reflector class in VbUnit iterates through the type library in order to find the testXXXX methods, so you need to make sure the typelibs are properly set up. -- EdSchweppe


TestingFramework


CategoryTesting


EditText of this page (last edited February 16, 2005) or FindPage with title or text search