IntelliJ Idea “Make” causes rebuild while running JUnit Test

I am trying to move from Eclipse to Idea and having a hard time trying to execute JUnits. The application is a legacy application with 10k+ java classes.

Whenever I run any JUnit, either it takes 3-4 minutes to compile a single test case and then executes it, or it gives a ClassNotFoundException for that particular JUnit class.

Turns out that while running the JUnit test, the classes in the output directory are deleted on each single run and compiled again.
I can confirm "Clean output directory on Rebuild" is unchecked. I am using "Eclipse" as the compiler mode.

I have done a full build of the project (which takes about 9 minutes). I expect that after build only the modified files should be recompiled during "Make". And in my case, since I haven't changed any file, the JUnit should execute immediately.

I am using IntelliJ Idea 12 Community Edition and I have "Use External Build" checked in Compiler settings.

Am I missing any setting or doing anything wrong?

1 comment
Comment actions Permalink

Could you please reproduce the problem and attach log/build-log/build.log file (you can use Help | "Show Log" to open the log directory)?

Nikolay Chashnikov
Software Developer
"Develop with pleasure!"


Please sign in to leave a comment.