> -----Original Message----- > From: Marcel Stör [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 3:06 PM > To: 'Ant Users List' > Subject: RE: [Junit] How to handle TestSuites correctly > > Keith Hatton wrote: > > forkmode="once" will take care of that if you are using Ant 1.6.2+. > > Well, I guess I didn't express myself precisly enough, sorry. The tests > don't depend on each other. It's just that each test starts up its own > application context in the underlying framework since it is run in its > own memory realm. That takes up too much time and that's why are looking > for solutions to have all tests run in the same context.
The remark by Keith to look into forkmode="once" is still valid though. In more details, Ant by default, with fork="true", forks a new JVM for each TestCase class, which can indeed be expensive with a heavy initial setUp. With forkmode="once", Ant forks a single JVM that executes all the TestCases. Note that it's still the TestCases responsibility to do the heavy-weight initialization only once, but that's usually easy to ensure. The technique would allow one test to somehow corrupt the test environment for subsequent tests, but the speed up benefit usually outweighs the loss in test isolation / independence. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
