This post originated from an RSS feed registered with Java Buzz
by scot mcphee.
Original Post: Unit tests run too slow with Ant
Feed Title: SystemExxception()
Feed URL: http://www.autonomous.org/pebble/systemexxception/rss.xml?category=Java
Feed Description: java design and culture by scot mcphee
I've got a project with about 650 unit tests (and counting). I've got a speed problem running these tests in Ant.
If I run them in Eclipse (right click on test directory, select Run - Junit Test), it takes about three minutes to run all these tests (as I would expect) - 170.734 seconds the last run took.
In Ant however, whether that's running under the Cruisecontrol build on "Bob the Builder", or, a manually launched test run from the Cygwin command line on my development machine, the same tests take over 20 minutes (i.e. six times slower than Eclipse)! I've tried a variety of things, such as forking and not-forking the tests, none seem to make much difference. I've verified that the tests under ant use the correct stubs and mocks. I'm well stumped.
Anyone got any ideas, clues or hints as to why this may be the case and what, if anything, I can do about it?