RE: [Cppunit-devel] Parameterizing tests by using XML
Brought to you by:
blep
From: Moran Ben-D. <mbe...@ii...> - 2002-07-18 17:03:37
|
To follow your raising of the overhead issue.. Although XML is great, it is a bit beurocratic when all you want to send your test case is a an integer.. I think the best approach to data driving the test cases is to start with stl containers (e.g. map).. e.g. a test case receives a list of keys and values created when the test is setup in the runner. As for the design of this, I am not sure.. however, as long as the person(s) writing and feeding the tests are able to decide data structure that is passed (e.g. stl container, xml dom, etc.), the framework will be best. thanks, moran -----Original Message----- From: Duane Murphy [mailto:dua...@ma...] Sent: Thursday, July 18, 2002 12:10 PM To: CppUnit Developers Subject: Re: [Cppunit-devel] Parameterizing tests by using XML 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 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |