The Artima Developer Community
Sponsored Link

Java Buzz Forum
Speed up JUnit tests in Ant

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Simon Brown

Posts: 636
Nickname: simonbrown
Registered: Jun, 2003

Simon Brown is a Java developer, architect and author.
Speed up JUnit tests in Ant Posted: May 23, 2006 4:24 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Simon Brown.
Original Post: Speed up JUnit tests in Ant
Feed Title: Simon Brown's weblog
Feed URL: http://www.simongbrown.com/blog/feed.xml?flavor=rss20&category=java
Feed Description: My thoughts on Java, software development and technology.
Latest Java Buzz Posts
Latest Java Buzz Posts by Simon Brown
Latest Posts From Simon Brown's weblog

Advertisement

I've been having a few problems with some JUnit tests recently. They would run fine through IDEA, but would cause the JVM to hang whenever they were executed through an Ant build script. As a workaround, I just used the fork property of the junit task so that the tests would run in a separate JVM. This did the trick but slowed test execution down substantially.

In trying to solve this, I bought up the current documentation for the junit task and saw that v1.6 introduced a new reloading property. By default, the junit task creates a new classloader for each test case and this new property allows you to configure this behaviour. Now my tests work again and they're much, much faster. A handy little feature that passed me by.

Read: Speed up JUnit tests in Ant

Topic: [May 15, 2006 16:18 PDT] 3 Links Previous Topic   Next Topic Topic: Cracking the New Sun Certified Programmer for Java 1.5 Exam

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use