This was actually my understanding too. We made a class that builds a test suite dynamically based off of a directory (starting point) and it now runs all of our tests in under 2 minutes instead of 30.
Thanks, Bryan --- Siegfried Goeschl <[EMAIL PROTECTED]> wrote: > Hi Bryan, > > I think Maven is not guilty but your approach using > static initializer > and singletons is improvable > > The JUNIT way > > +) of defining a lifecycle for an individual test > case is setup() and > tearDown() > +) of providing resources shared across multiple > testsuites is using a > TestSetup > > The only trouble is that executing individual tests > is not possible > since they depend on running the TestSetup before > > Cheers, > > Siegfried Goeschl > > bryan hansen wrote: > > >We are using maven to run our Unit Tests which are > >accessing the database through Hibernate. It seems > >that when Maven builds the test suite it is > >reconfiguring hibernate before each TestCase. So if > >there are 3 tests in a class it will run those with > >the same configuration, but when it goes to the > next > >test it will reconfigure hibernate again. I have > the > >configuration code in a static initializer and am > >accessing it from a Singleton (in fact I copied it > >from Hibernate's website) and it is still doing it. > I > >have tried setting the various properties for > testing > >and can't seem to make a difference: > > > >maven.junit.fork=true > >maven.junit.jvm=java > > > >It has gotten to the point that the build box is > >throwing out of memories errors because it is > trying > >to allocate so many resources. > > > >The only step I can think to do next is to not have > >maven build my test suite and instead create on > >myself, but I am afraid that it will become > >unmaintainble because of all the test cases we > have. > > > >Any ideas? > > > >Thanks, > > > >Bryan > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam > protection around > >http://mail.yahoo.com > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
