Ant unit test forking behaviour
There is a long-standing issue with the way that ant’s JUnit task runs tests. The default behaviour is to fork off a new JVM for each test - which is *very* slow, particularly if you are doing something like GWT Unit Tests.
In this case, the whole GWT environment bootstrap (about 20 seconds on our cruise box) happens once per test. Ouch.Fortunately there is a solution, in ant 1.6.2 and above - use the forkMode attribute :
<junit fork="true" forkMode="once" ...
See the junit tag documentation for more details :
http://ant.apache.org/manual/OptionalTasks/junit.html
August 16th, 2007 at 10:50 am
Chris, using a TestSuite can speed up GWT Tests a fair amount as the environment is loaded just once for each suite - though this probably is the same as what the ant forkMode achieves anyway :)
See http://diningtablecoder.blogspot.com/2007/03/gwt-unit-tests-running-slowly-use.html
October 20th, 2008 at 2:14 pm
Hello,
I am, Paul
some crazy threads
check out my page:
http://WXjXvmNfF.spaces.live.com/