Poor/Slow Unit Testing Performance with Maven

Our development struggled for some time as the application was getting bigger and bigger, the performance of unit testing got really bad becoming at some point (especially after migrating to latest Hibernate 3.6) unusable (aka stop of quality development) šŸ˜¦

We investigated the environment (jdk, hw specs, ram), the frameworks being used (Hibernate, Spring), even the underlying DB (I am actually here talking of integration tests)… but the answer was to be found in the Maven settings.

The Maven Surefire Plugin instantiates a new JVM for running the test classes, but it appears that the JVM settings of Maven (typically what you set in the bin/mvn.bat) are not propagated to the newly created JVM, hence running the tests with some (inadequate) default values…

CheckĀ this out to see how the JVM memory settings can be configured. It did the trick šŸ™‚



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: