[XML-SIG] "Borrowed" tests

Uche Ogbuji uche.ogbuji@fourthought.com
Fri, 06 Apr 2001 09:45:22 -0600


> On Thu, 5 Apr 2001, Uche Ogbuji wrote:
> > I've long had the practice of placing test cases based on bug reports or 
> > examples provided by others into a "test_suite/borrowed" directory.  I think 
> > this is useful, and important to distinguish from the "canned" tests.
> 
> Your logic here escapes me.  Why would this distinction 
> be necessary?

It's not necessary.  My main goal is to get the tests back in regardless of 
where they go.  I was just suggesting a course based on what I'd done before.

The reason why I made the distinction before is that the "canned" tests were 
grouped according to speficication fiat, so there'd be, say a test_variable.py 
which tests the various diktats of section 11.4 of the XSLT spec.

The tests that come from bug-reports and borrowed code tend not to be so easy 
to neatly categorize.  Therefore I placed them in a separate directory just to 
provide a separate axis of grouping.  Not a big deal, except that this 
directory got lost for 4DOM as it moved to PyXML.

> It just seems like extra work with no
> additional benifit.

There's no extra work whatsoever.  Why do you think there is?

> As I find bugs in my software I 
> add it to my regression test, and usually name the
> test after the bug.  You could opt for a naming
> convention, where "canned" tests start with a "c"
> and borrowed tests start with a "b" (for bug)

This is exactly what I do.  The *only* difference being that I differentiate 
by directory placement rather than prefix.  I actually think the directory 
approach is less work than the prefix approach, but perhaps we're 
misunderstanding each other.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python