OutOfMemory Errors
Error Description:
The Java Virtual Machine (JVM) serves as a platform-independent execution environment for web applications written in Java. However, during test execution, the JVM runs out of memory while handling a large volume of data, resulting in reports not being generated. The following error message is displayed:
TestRunner.runner.TestRunner >> OutOfMemory Java heap space
Error Context:
This error occurs when JVM runs out of memory. This issue can arise due to either running a large number of test cases or when report size increases.
Resolution:
To address this, run the following commands for maven:
To execute all the test cases : mvn test -DargLine="-Xmx512m"
To execute a specific test case : mvn test -Dcucumber.filter.tags="@test002" -DargLine="-Xmx512m"
Resolution:
To address this, run the following command to start the apache server:
java -Xmx512M -jar algoqa_springboot_api.jar
In this preceding command, 512 mb of heap space will allocated to java server. You can increase or decrease the heap space according to requirement.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article