Michael Allen
Michael Allen

Reputation: 5838

IntelliJ increase Scalatest Heap space

I'm using IntelliJ to run Scalatest tests. Problem I'm having is the tests are running out of Heap space (likely because my tests are using Selenium and starting up jettys to hit my Api).

I know how to increase my Heap space in IntelliJ but after increasing the space the tests still run out of Heap.

Is there a different place to increase Heap space for tests rather than the usual IntelliJ info.plist (oh btw I'm on Mac)

Upvotes: 4

Views: 2211

Answers (2)

tolitius
tolitius

Reputation: 22549

go to Edit Configurations:

enter image description here

Choose the test on the left, and tweak its VM options:

enter image description here


In case you are using a ScalaTest ant task, there is a jvmarg that you can set:

<jvmarg value="-Xmx2048m -XX:MaxPermSize=128m"/>

Upvotes: 9

Franck Rasolo
Franck Rasolo

Reputation: 559

As you rightly observed, it is not IDEA's heap size that needs to be increased but rather that of the ScalaTest run configuration accessible from the Run > Edit Configurations... dialog. There, you should be able to set the VM Options for the tests you are trying to run.

Upvotes: 2

Related Questions