ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Lindner <>
Subject Re: <junit> slow?
Date Thu, 21 Dec 2006 10:09:12 GMT
Matt Benson wrote:
> Has anyone ever noticed Ant running junit tests
> exceedingly slowly, perhaps only in the case of
> testsuites or nested testsuites?  I am looking at a
> testsuite that has about 600 child tests, which all
> run in < 2 seconds in Eclipse's JUnit runner, but take
> 15-20 minutes in Ant.  :|

Just to make sure you don't fall in the same trap as me:
Eclipse uses a "one jvm instance for all tests" approach. Thats as fast 
as one can get.

If you run your tests on a network drive with the ant junit task, it 
will severely slow down the execution. I guess these are caching effects 
on eclipse's side.

The next thing to look for is the "forkmode" attribute of ant's junit 
task. It defaults to "one jvm per test class" (perTest). That creates 
additional overhead for every testclass you use. Using Testsuites 
indicates many test classes, so i suggest you check that neither the 
junit task nor the batchtest tasks (if any) have the default forkmode set.

I hope that helped. This issue bugged me for a while, i think the 
default value for forkmode is broken - if you watch it from an 
"eclipsed" point of view.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message