Fails to generate test report - java.lang.OutOfMemoryError: Java heap space


#1

Job Process - Preparing HTML Report> never ends after executing all the test cases present in test suite.

Error Log:

!ENTRY org.eclipse.jface.text 2 0 2019-04-19 11:10:16.126
!MESSAGE Duplicate template id: 'org.codehaus.groovy.eclipse.templates.synchronized'
Exception in thread "Thread-173" java.lang.OutOfMemoryError: Java heap space
	at org.apache.commons.lang.text.StrBuilder.ensureCapacity(StrBuilder.java:234)
	at org.apache.commons.lang.text.StrBuilder.append(StrBuilder.java:479)
	at org.apache.commons.lang.text.StrBuilder.append(StrBuilder.java:462)
	at org.apache.commons.lang.StringUtils.join(StringUtils.java:3399)
	at org.apache.commons.lang.StringUtils.join(StringUtils.java:3444)
	at com.kms.katalon.core.reporting.ReportUtil.generateVars(ReportUtil.java:56)
	at com.kms.katalon.core.reporting.ReportUtil.prepareHtmlContent(ReportUtil.java:299)
	at com.kms.katalon.core.reporting.ReportUtil.writeHtmlReport(ReportUtil.java:283)
	at com.kms.katalon.execution.launcher.ReportableLauncher.prepareReport(ReportableLauncher.java:196)
	at com.kms.katalon.execution.launcher.ReportableLauncher.preExecutionComplete(ReportableLauncher.java:85)
	at com.kms.katalon.execution.launcher.ProcessLauncher.onWatchdogComplete(ProcessLauncher.java:191)
	at com.kms.katalon.execution.launcher.LaunchWatchdog.notifyProcessTerminated(LaunchWatchdog.java:135)
	at com.kms.katalon.execution.launcher.LaunchWatchdog.run(LaunchWatchdog.java:65)
	at java.lang.Thread.run(Thread.java:748)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-04-19 13:42:40.035
!MESSAGE 
!STACK 0
java.lang.OutOfMemoryError: Java heap space
	at org.apache.commons.lang.text.StrBuilder.ensureCapacity(StrBuilder.java:234)
	at org.apache.commons.lang.text.StrBuilder.append(StrBuilder.java:479)
	at org.apache.commons.lang.text.StrBuilder.append(StrBuilder.java:462)
	at org.apache.commons.lang.StringUtils.join(StringUtils.java:3399)
	at org.apache.commons.lang.StringUtils.join(StringUtils.java:3444)
	at com.kms.katalon.core.reporting.ReportUtil.generateVars(ReportUtil.java:56)
	at com.kms.katalon.core.reporting.ReportUtil.prepareHtmlContent(ReportUtil.java:299)
	at com.kms.katalon.core.reporting.ReportUtil.writeHtmlReport(ReportUtil.java:283)
	at com.kms.katalon.core.reporting.ReportUtil.writeLogRecordToFiles(ReportUtil.java:134)
	at com.kms.katalon.core.reporting.ReportUtil.writeLogRecordToFiles(ReportUtil.java:119)
	at com.kms.katalon.composer.report.handlers.ExportHTMLReportHandler.execute(ExportHTMLReportHandler.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)

#2

Team, Would you like to take an action on this…!


#3

Due to this, debugging the failures in a test is difficult.

image


#4

Hi there,

I’ve come across something quite similar to this error. My script was made to take screenshots after each step and going through the screenshot did NOT show any signs of the Application Under Test to be crashing. Ideally, the script was supposed to be running for a total of ~3 hours to successful be able to PASS the test but it failed after about 40 min into running the TC.

Environment Details
Test PC OS: Windows 10 Pro
Katalon Version: 6.2.1
Appium Version: 1.12.1
Test mobile device: Google Pixel XL running Android 9

Katalon Console

2019-07-11 18:12:34.357 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Element 'Object Repository/App-MsgSvr/Messaging/aw.EditText - Message Input’ not found
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/screenshot e[39me[32m200e[39m e[90m928 ms - 300924e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contexte[39m
e[35m[HTTP]e[39m e[90m{“name”:“NATIVE_APP”}e[39m
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/context e[39me[32m200e[39m e[90m1 ms - 14e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contexte[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/context e[39me[32m200e[39m e[90m1 ms - 22e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contextse[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contexts e[39me[32m200e[39m e[90m74 ms - 24e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contexte[39m
e[35m[HTTP]e[39m e[90m{“name”:“NATIVE_APP”}e[39m
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/context e[39me[32m200e[39m e[90m1 ms - 14e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/screenshote[39m
e[35m[HTTP]e[39m e[90m{}e[39m
2019-07-11 18:12:35.342 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Cannot send keys ‘Count: 288
Timestamp: 2019-07-11 18:12:03’ on test object ‘Object Repository/App-MsgSvr/Messaging/aw.EditText - Message Input’. (Root cause: com.kms.katalon.core.exception.StepFailedException: Element ‘Object Repository/App-MsgSvr/Messaging/aw.EditText - Message Input’ not found
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword$_sendKeys_closure1.doCall(SendKeysKeyword.groovy:50)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword$_sendKeys_closure1.call(SendKeysKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword.sendKeys(SendKeysKeyword.groovy:58)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword.execute(SendKeysKeyword.groovy:39)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.sendKeys(MobileBuiltInKeywords.groovy:1783)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$sendKeys$4.call(Unknown Source)
at _Send INT A2A msg.run(_Send INT A2A msg:104)
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:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1562828695698.run(TempTestSuite1562828695698.groovy:35)
)
2019-07-11 18:12:35.343 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/App-MsgSvr/Messaging/_Send INT A2A msg FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Element ‘Object Repository/App-MsgSvr/Messaging/aw.EditText - Message Input’ not found
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword$_sendKeys_closure1.doCall(SendKeysKeyword.groovy:50)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword$_sendKeys_closure1.call(SendKeysKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:21)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword.sendKeys(SendKeysKeyword.groovy:58)
at com.kms.katalon.core.mobile.keyword.builtin.SendKeysKeyword.execute(SendKeysKeyword.groovy:39)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.sendKeys(MobileBuiltInKeywords.groovy:1783)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$sendKeys$4.call(Unknown Source)
at _Send INT A2A msg.run(_Send INT A2A msg:104)
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:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1562828695698.run(TempTestSuite1562828695698.groovy:35)

2019-07-11 18:12:35.363 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/App-MsgSvr/Messaging/Send INT A2A msg
2019-07-11 18:12:36.016 INFO com.kms.katalon.core.util.KeywordUtil - Start generating HTML report folder at:**_Location Hidden_**
e[35m[HTTP]e[39m e[37m<-- GET /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/screenshot e[39me[32m200e[39m e[90m858 ms - 300924e[39m
e[35m[HTTP]e[39m e[90me[39m
e[35m[HTTP]e[39m e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/contexte[39m
e[35m[HTTP]e[39m e[90m{“name”:“NATIVE_APP”}e[39m
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895b/context e[39me[32m200e[39m e[90m1 ms - 14e[39m
e[35m[HTTP]e[39m e[90me[39m
2019-07-11 18:12:41.534 ERROR c.k.k.core.context.internal.TestHooker - :x: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space
e[35m[HTTP]e[39m e[37m–>e[39m e[37mDELETEe[39m e[37m/wd/hub/session/a070d0d1-620e-4eb2-ad88-0f6f0248895be[39m
e[35m[HTTP]e[39m e[90m{}e[39m
e[35m[Appium]e[39m Removing session a070d0d1-620e-4eb2-ad88-0f6f0248895b from our master session list
2019-07-11 18:12:44.006 INFO c.k.katalon.core.main.TestSuiteExecutor - --------------------
**2019-07-11 18:12:44.006 INFO c.k.katalon.core.main.TestSuiteExecutor - END Test Suites/
Name of the Test Case Hidden
2019-07-11 18:12:44.006 INFO c.k.katalon.core.main.TestSuiteExecutor - ====================

Event Log

Warning: NLS missing message: MSG_FORUM_SEARCH in: com.kms.katalon.constants.messages
<<folder location hidden>>
<<folder location hidden>>
<<folder location hidden>>
<<folder location hidden>>
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Warning: NLS unused message: Key in: com.kms.katalon.composer.webui.constants.composerWebuiMessages
Warning: NLS missing message: DIA_CONFIRM_INSTALL_WEBDRIVER in: com.kms.katalon.composer.webui.constants.composerWebuiMessages
Warning: NLS missing message: DIA_CONFIRM_INSTALL_WEBDRIVER_TITLE in: com.kms.katalon.composer.webui.constants.composerWebuiMessages
Launcher status after execution process completed: Running
Launcher status after execution process completed: Running
Start writing execution.uuid file to folder: <<folder location hidden>>
Start writing execution.uuid file to folder:<<folder location hidden>>

Any leads on how to prevent this from happening while running future Test Cases would be much useful. Also, if there any information that I could provide I’m happy to reply here. Cheers.


#5