jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. B. Rainsberger" <jbra...@rogers.com>
Subject Re: Asking Questions
Date Mon, 24 Nov 2003 14:11:10 GMT
Vincent Massol wrote:

>>Well, I can check the deployment descriptors with XMLUnit. I don't
> test
>>the container. I don't test the database.
> But then you will only test whether it is syntactically correct but not
> if it works which is the point of integration tests, no? For example I
> can have a JNDI mapping xml file which is correct but does not match the
> the JNDI names I'm using in the code for the EJBs (happens all the time
> :-)).

If I find this is a problem, I add a test: for each EJB in an 
ejb-jar.xml file, verify that it has a mapping in the JNDI mapping file. 
At this point, though, it's easier just to try to deploy the application 
and see whether the deployer complains, as JBoss does. It would be neat 
to hook a deployment listener into JBoss and use it to write a test: 
package and deploy the application, then fail if the deployer complains 
about something. I could have CruiseControl trying to do this in the 
background and reporting deployment errors to me every few minutes. :) 
If I were using EJBs....

Of course, if I'm /generating/ those XML documents, then I really want 
to test both the generator (if I wrote it) and the input to that 
generator, rather than the result. If using XDoclet, but example, I'll 
want to test the XDoclet tags... although if they're /right there/ 
beside each other, I'm not likely to get them wrong.

<snip-agreement />
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand

View raw message