NullPointerException occuring randomly for ReportableLauncher.sendReportEmail

Hi,

I have a simple Webtest (open a page and enter user credentials). The test is working fine. When the test fails, an email should be sent.
So I configured the Project Settings → Email accordingly with an SMPT server and credentials. Email sending is also working fine (I tested with the “send test email” button. And also with the real Testcase.

Now I have created a batch file (bat) which is calling the Katalon instance in command line mode. This is the call:
katalon -noSplash -runMode=console -consoleLog -projectPath=“C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj” -retry=0 -testSuitePath=“Test Suites/LoginTestSuite” -executionProfile=“default” -browserType=“Chrome”

The bat file is scheduled to be executed every 5 minutes with the windows task scheduler.

Here is the problem: Sometimes (it seems to be random) the test execution is throwing a null-pointer exception and eMails are not beeing sent.
Example: the automated test execution at 14:00 is working fine, at 14:05 it is working fine, at 14:10 there is a nullpointer exception, at 14:15 there is a nullpointer exception, at 14:20 it is working fine, …

What could be the reason for this strange behaviour? The code is always the same, nobody is touching the system. Every run should give the same result.

This is the error message from the log-file (three executions 14:45 working fine, 14:50 Nullpointer, 14:55 working fine)

!ENTRY org.eclipse.core.resources 2 10035 2018-08-30 14:40:48.991

!MESSAGE The workspace will exit with unsaved changes in this session.

katalon.versionNumber=5.6.3

katalon.buildNumber=1

!SESSION 2018-08-30 14:45:11.727 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0_181

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments: -runMode=console -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

Command-line arguments: -os win32 -ws win32 -arch x86_64 -data config -runMode=console -consoleLog -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

!ENTRY org.eclipse.core.resources 2 10035 2018-08-30 14:45:14.696

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.resources 2 10035 2018-08-30 14:45:49.154

!MESSAGE The workspace will exit with unsaved changes in this session.

katalon.versionNumber=5.6.3

katalon.buildNumber=1

!SESSION 2018-08-30 14:50:11.731 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0_181

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments: -runMode=console -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

Command-line arguments: -os win32 -ws win32 -arch x86_64 -data config -runMode=console -consoleLog -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

!ENTRY org.eclipse.core.resources 2 10035 2018-08-30 14:50:14.637

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

Thu Aug 30 14:50:20 CEST 2018

java.lang.NullPointerException

at com.kms.katalon.core.reporting.JsSuiteModel.(JsSuiteModel.java:29)

at com.kms.katalon.core.reporting.ReportUtil.prepareHtmlContent(ReportUtil.java:295)

at com.kms.katalon.core.reporting.ReportUtil.writeHtmlReport(ReportUtil.java:284)

at com.kms.katalon.execution.launcher.ReportableLauncher.prepareReport(ReportableLauncher.java:179)

at com.kms.katalon.execution.launcher.ReportableLauncher.preExecutionComplete(ReportableLauncher.java:77)

at com.kms.katalon.execution.launcher.ProcessLauncher.onWatchdogComplete(ProcessLauncher.java:171)

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)

Thu Aug 30 14:50:20 CEST 2018

java.lang.NullPointerException

at com.kms.katalon.execution.launcher.ReportableLauncher.sendReportEmail(ReportableLauncher.java:148)

at com.kms.katalon.execution.launcher.ReportableLauncher.sendReport(ReportableLauncher.java:128)

at com.kms.katalon.execution.launcher.ReportableLauncher.preExecutionComplete(ReportableLauncher.java:81)

at com.kms.katalon.execution.launcher.ProcessLauncher.onWatchdogComplete(ProcessLauncher.java:171)

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.core.resources 2 10035 2018-08-30 14:50:34.274

!MESSAGE The workspace will exit with unsaved changes in this session.

katalon.versionNumber=5.6.3

katalon.buildNumber=1

!SESSION 2018-08-30 14:55:11.722 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.8.0_181

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments: -runMode=console -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

Command-line arguments: -os win32 -ws win32 -arch x86_64 -data config -runMode=console -consoleLog -projectPath=C:\Users\tsie\KatalonStudio\TestBWTPartnerWebDE\TestBWTPartnerWebDE.prj -retry=0 -testSuitePath=Test Suites/LoginTestSuite -executionProfile=default -browserType=Chrome

!ENTRY org.eclipse.core.resources 2 10035 2018-08-30 14:55:14.753

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

:

1 Like