[jdom-interest] RE: jdom-test issues

Galluzzo, Eric EGalluzzo at synchrony.net
Tue Feb 20 06:15:44 PST 2001


> -----Original Message-----
> From: Edoardo Comar [mailto:edoardo at knowledgeview.co.uk]
> 
> HI
> 
> just my 2c about junit testing,
> I found very useful defning my TestCases in the same package 
> as the class to
> be testes. (this does not mean they have to reside in the 
> same directory, of
> course).
> sometimes leaving some methods/fields with package access for 
> testing made
> my tests easier to write.

We have done that too.

We have also found creating a TestUtils class with all the constants defined
in a big Properties hash table useful.  Then we can parameterize the test
case via a test.properties file.  Admittedly, the main reason that we have
for doing this is that we write testcases that run against multiple
databases, each of which have different contents; so that idea might not be
desperately useful here.  However, we have often found that we can reuse
tests by putting them in the TestUtils class or a superclass TestCase.

Anyway, enough rambling...hope that helps! :)

    - Eric



More information about the jdom-interest mailing list