Search code examples
scalaintellij-ideajvmheap-memoryscalatest

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)


Solution

  • 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"/>