dmitrynikolaev
dmitrynikolaev

Reputation: 9132

Intellij idea tests compilation takes too long (compared with Eclipse)

When I "junit" some class, compilation in Idea takes about 4-5 sec. In Eclipse it takes milliseconds.

What should I do to speed up Intellij Idea compilation for tests?

Upvotes: 7

Views: 8711

Answers (4)

Stanislav Semenchuk
Stanislav Semenchuk

Reputation: 177

I encountered such a problem using Gradle. Make sure that the tests run under Idea. Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Run tests using -> IntelliJ IDEA

Upvotes: 7

dmitrynikolaev
dmitrynikolaev

Reputation: 9132

There is plugin in Idea plugin repository which solve exactly this problem!

Upvotes: 4

Arne Burmeister
Arne Burmeister

Reputation: 20594

Eclipse compiles on the fly (on save), so it does not have to do anything but to start the tests. Idea does not. Before starting the tests it has to make (compile all changed classes of the whole project). It is also not possible to start a test in idea when there is any compile error elsewhere in the project.

Upvotes: 5

Shawn Vader
Shawn Vader

Reputation: 12385

I don't have IntelliJ in front of me but could it be that IntelliJ is set to do a clean compile before it runs the tests where Eclipse is set to do a make (I.e only compile changed classes)

Just a thought

Upvotes: 0

Related Questions