Hi all,
We use Katalon Studio with Runtime Engine License and run it in azure DevOps.
My test get OutOfMemoryError in azure DevOps pipeline, but I can run it in my local / VM.
I saw the solution of changing katalon.ini file like as this… but I run my test in azure DevOps, so I think I cannot change the ini file in katalon task at the same time, right?
Is there any solution?
FYI : My test includes comparison of large screenshots. So it show OutOfMemory even if I reduced the number of test cases to run at once.
Anyway, it can be run in my local, so I think it is memory problem.
Error:
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space
Hi, @huynguyen,
I think the feature requires “Katalon Studio Enterprise” license, right?
We have KRE but not KSE…
I cannot edit Execution > Launch Arguments setting although I use 7.2.9.
You do not need KSE license to increase the size of memory allocated for a KRE runtime.
On my windows 10 desktop, I installed Katalon Studio (not Enterprize) in %USER_PROFILE%\Katalon_Studio_Windows_64-7.2.1.
In that directory I find a plain text file named katalon.ini.
You need to go back to the error log and try to find out at which stage of processing you got the error org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space.
@kazurayam
Thank you. Actually the test is from yours (Thanks as always)
In the part of “ImageDiff_chronos”. I run my test with big screenshots… My test failed when examining 2.9MB png.
(Anyway it succeeds in my local and use only 360M) stdout.log (9.5 KB)
2020-03-30 03:49:44 - [TEST_CASE][ERROR] - Test Cases/Exam_capture/ImageDiff_chronos_biguser: Test Cases/Exam_capture/ImageDiff_chronos_biguser FAILED.
Reason:
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space
at com.kazurayam.visualtesting.ImageDiffer.invokeMethod(ImageDiffer.groovy)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
at ImageDiff_chronos_biguser.run(ImageDiff_chronos_biguser:13)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1585539994136.run(TempTestSuite1585539994136.groovy:36)
Caused by: java.lang.OutOfMemoryError: Java heap space
at ru.yandex.qatools.ashot.comparison.PointsMarkupPolicy.addDiffPoint(PointsMarkupPolicy.java:41)
at ru.yandex.qatools.ashot.comparison.ImageDiff.addDiffPoint(ImageDiff.java:51)
at ru.yandex.qatools.ashot.comparison.ImageDiffer.markDiffPoints(ImageDiffer.java:81)
at ru.yandex.qatools.ashot.comparison.ImageDiffer.makeDiff(ImageDiffer.java:57)
at ru.yandex.qatools.ashot.comparison.ImageDiffer$makeDiff.call(Unknown Source)
at com.kazurayam.materials.imagedifference.ImageDifference.makeImageDiff(ImageDifference.groovy:47)
at com.kazurayam.materials.imagedifference.ImageDifference.<init>(ImageDifference.groovy:38)
at com.kazurayam.materials.stats.StorageScanner.makeImageDelta(StorageScanner.groovy:391)
at com.kazurayam.materials.stats.StorageScanner$makeImageDelta$5.callCurrent(Unknown Source)
at com.kazurayam.materials.stats.StorageScanner.makeMaterialStats(StorageScanner.groovy:276)
at com.kazurayam.materials.stats.StorageScanner$makeMaterialStats$2.callCurrent(Unknown Source)
at com.kazurayam.materials.stats.StorageScanner.makeStatsEntry(StorageScanner.groovy:173)
at com.kazurayam.materials.stats.StorageScanner.scan(StorageScanner.groovy:137)
at com.kazurayam.materials.stats.StorageScanner$scan$1.call(Unknown Source)
This stacktrace impies that the image comparison algorithm of AShot library is NOT designed memory-efficient. It may consume super large heap memory for pixel-wise comparison. — just I guess. All we can do now is to allocate bulky -Xmx****, I think.
I have found out that the com.kazurayam.materials.imagedifference.ImageCollectionDiffer class contained in the ver 0.74.0 of Materials library has a bug: a sort of memory-leak.
I am sure that this bug caused OutOfMemoryError occured to @rie.ota
I will fix this problem soon and release an update.
If you have any project using the VisualTestingInKatalonStudio, you can easily update the framework to the latest version. In your project, you have build.gradle file, right? You change the vt.version as follows:
plugins {
id "com.github.kazurayam.visualtestinginks" version "0.1.21"
}
vt.version = '1.17.3'
And in the commandline, you want to do:
$ cd $yourVisualTesingProject
$ ./gradlew enableVisualTesting
then, all the code and libraries of “VisualTestingInKatalonStudio” will be automatically updated. The change from 1.17.3 requires no changes required to your test case scripts.
In the $KatalonStudioInstalledDirectory/katalon.ini file, you specify the maximum heap space allocated to Java VM of Katalon Studio. I would recommend you to write in the katalon.ini