Re: [Cppunit-devel] Parameterizing tests by using XML
Brought to you by:
blep
From: Robert W. <ro...@po...> - 2002-07-19 07:00:54
|
Hi, On Friday 19 July 2002 08:36, Michel Armin wrote: > Hi all. > > Actually I was thinking about a little bit different solution here. > It differs mainly in two points: > > 1. the framework should be responsible for parsing the xml file and > invoke the test with a particular set of parameters (as opposed to > let each of the test cases perform the parsing) > > 2. the DTD of the xml file is a less sophisticated These are _very_ important points -- you would not want to need test cases for your test cases, right? I still see two big drawbacks on using a XML driven test. First it drops the advantage of having the tests written in the same language as the code under test. Developers have to learn another new language / syntax / semantics and can not focus on their real work. Even though XML looks easy, it has some pitfalls you will most likely uncover and which will cost really lots of time, nerves, and sanity. Second I don't think the XML overhead justifies the results. How many tests do you have that run the same way that you just need to exchange the input and output values? (And how many of those use primitive inputs and outputs?) If I ever have to write more than three tests for the same method, I think hard about abetter design, usually the method has just too much responsibilities. Just my 2 cents, Robert |