Test cases are something we really need, but I don't know really how to
write *effective tests* for our cases, because of different combinations
and the fact that it's impacted by what's there in templates and also by
the code itself.

Ara.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-devel-
> [EMAIL PROTECTED]] On Behalf Of Andrew Stevens
> Sent: Wednesday, September 19, 2001 2:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-devel] a few bugs in ejb-jar.xml generation
> 
> A wise old hermit known only as  <[EMAIL PROTECTED]> once said:
> 
> > Wouldn't it be nice if the XDoclet core could validate all generated
> > XML files against a DTD (or XMLSchema for that matter) once it's
> > generated? This would be great for testing, and we can use xerces
(or
> > any other validating parser) to do the job. We could write JUnit
test
> > cases (accompanied with test data which would be @tagged sources)
that
> > would ensure that XDoclet is always sound! It would result in *way*
> > better quality of XDoclet. In my opinion this is more important than
> > anything else. I can contribute with this if there is agreement on
it.
> >
> > Right now, i'm thinking of adding a method to SubTask.java like
this:
> >
> > validateXml( InputStream xml, InputStream dtd );
> >
> > This method could be called by SubTask subclasses after generating
an
> > xml file, with the possibility to turn validation on/off through ant
> > parameters.
> >
> > Comments?
> >
> > Aslak
> 
> Why stop at only XML?  Anything that's generating a java class (e.g.
all
> the other ejbdoclet subtasks) could validate it by trying to compile
it.
> Of course, that only ensures the syntax is valid and not that it makes
> sense, but you could say the same for the DDs.  e.g. For a while the
BMP
> beans were getting "<persistence-type>Container<persistence-type>"
> generated, which while wrong is still valid according to the DTD.  I
guess
> more specific test cases could be written to check things like that,
> though.
> 
> 
> Andrew.
> 
> _______________________________________________
> Xdoclet-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-devel


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to