I think moving to or adding a data driven interface to cppUnit would be a
great feature. I have considered it myself.
XML is certainly the right way of doing this. It allows tests to be
written by hand or generated by some automated tool. This certainly
doesnt absolve the developer from writing test code, but a good design
should make it easier to focus on the test rather than the test
environment. One of my personal deterants to cppunit has been the
overhead involved in getting test registered in order to run. A data
driven approach would be great.
[ more comments below ]
--- At Thu, 18 Jul 2002 16:07:43 +0200, Steffen Huebner wrote:
>I have looked over CppUnit the last time to find a way making tests more
>flexible by parameterizing them.
>The idea is to place input parameters and corresponding expected values
>in a XML file.
>That forces to parse the incoming XML file.
>Having a common interface that gives the possibility to parse the XML
>file is our way to do so.
>At the moment I don`t really know how this interface should look and
>which methods it should provide.
>
>My questions about this are:
>1. What do you think about an interface with the possibility to use
>different parsers?
The XML interface should not depend on any parser. Standard XML features
should work with most any parser.
I suppose each parser does have its own interface. I was think more along
the lines of the XML file definition.
>2. Does such an interface for parsing already exists?
>
>I found MS XML and XML4C by Alphaworks(IBM) which are both useable in C++.
There is also libxml and libxml++. libxml++ is apparently still under
development. I wonder if an abstract interface can be developed that
would more easily allow different parsers to be used.
>3. Would that be a nice feature for your CppUnit-Framework?
Yes it would.
...Duane
--
"If tyranny and oppression come to this land, it will be in the
guise of fighting a foreign enemy." - James Madison
|