Hello All,
I just wanted to plant this seed since it is near on the horizon (I =
hope).
Once OpenGOOP Inheritance is a reality, it will be much more feasible to
implement a very flexible unit test framework for G. Such a framework
really needs inheritance and dynamic polymorphism (plug-ins).
I am thinking that what we need is something like PyUnit (a unit test
framework for Python). Here is a quick summary: We would define a =
TestCase
class that defines virtual (overridable) methods such as setUp, =
tearDown,
and runTest (as well as a means to define multiple tests). To create a
specific test case, you would create a class that inherits from =
TestCase.
You would then implement (override) the aforementioned methods of =
TestCase.
When a TestCase is run, the test framework would invoke setUp to =
initialize
the test. Then, if no error occurs, the framework would invoke runTest.
Finally, regardless of whether runTest was successful, tearDown would be
invoked to tidy up. The TestCase class would have several methods like
failUnlessEqual, failIfEqual, failUnlessError, failUnless. These would =
be
called inside one's subclass of TestCase to send pass/fail info to the =
test
framework.
There would also be a class called TestSuite, which is used to aggregate
test cases and test suites.
Finally there would be various different TestRunner classes which run
TestSuites and allow different types of interaction with running tests.
For more info on PyUnit, check out http://pyunit.sourceforge.net
The overview (link below) gives a good description of how one uses the =
Unit
Test framework.
http://pyunit.sourceforge.net/pyunit.html#OVERVIEW
The unittest module documentation (link below) shows all of the classes =
(and
their methods) of unittest.
http://pyunit.sourceforge.net/unittest.html
Lastly, what about a project name? 'Gunit' is already taken. I like
'OpenGUnit', or maybe 'LabUnit'...
Any thoughts?
Regards,
-Jim
|