Getting Java heap space error

I am running a test on Java/TestNG framework and due to some reason, I am getting the “Java heap space error” exception which is failing my test. Is there a way to increase heap space on LambdaTest or to bypass this error?

Hi! Hope all’s well.

This error usually occurs when the heap storage space is maxed. So in order to resolve this error, you can check the capabilities included in your code and turn the visual capability to false.

    capabilities.setCapability("visual", false);

Please give it a try and it will resolve the issue.

Cheers! Good day! :slight_smile:

1 Like