Test Suite working fine when running through command line but not when running as a Jenkins Job on same machine

Hello Team,

I created a test suite that I wanted to run using Jenkins job. While doing so I Installed the Katalon Run time engine and tested the command generated by Katalon to see if the command is working fine by executing it through command mode. It worked fine.

When I tried to use the Same command as a Jenkins job with Katalon Jenkins Plugin it is throwing this error.

[2020-01-06T22:00:08.729] 
[2020-01-06T22:00:08.729] --------------------------------------------------------------------------------
[2020-01-06T22:00:08.729] Test Suites/Sanity - CA Website - Chrome (headless) - 20200106_220007....0/1(0%)
[2020-01-06T22:00:08.729] --------------------------------------------------------------------------------
[2020-01-06T22:00:08.729] 
[2020-01-06T22:00:12.255] 2020-01-06 22:00:11.794 INFO  c.k.katalon.core.main.TestSuiteExecutor  - START Test Suites/Sanity - CA Website
[2020-01-06T22:00:12.255] 2020-01-06 22:00:11.876 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostName = jenkins - ip-xxxxxxx.us-east-2.compute.internal
[2020-01-06T22:00:12.255] 2020-01-06 22:00:11.877 INFO  c.k.katalon.core.main.TestSuiteExecutor  - os = Linux 64bit
[2020-01-06T22:00:12.255] 2020-01-06 22:00:11.877 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostAddress = xxxxxx
[2020-01-06T22:00:12.255] 2020-01-06 22:00:11.901 INFO  c.k.katalon.core.main.TestSuiteExecutor  - katalonVersion = 7.2.1.1
[2020-01-06T22:00:12.335] 2020-01-06 22:00:12.334 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
[2020-01-06T22:00:12.335] 2020-01-06 22:00:12.334 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/Smoke Test - Jenkins/Jenkins - Web Test
[2020-01-06T22:00:12.861] 2020-01-06 22:00:12.860 ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ Test Cases/Smoke Test - Jenkins/Jenkins - Web Test FAILED.
[2020-01-06T22:00:12.861] Reason:
[2020-01-06T22:00:12.861] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[2020-01-06T22:00:12.861] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 16: unable to resolve class org.openqa.selenium.JavascriptExecutor
[2020-01-06T22:00:12.861]  @ line 16, column 1.
[2020-01-06T22:00:12.861]    import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor
[2020-01-06T22:00:12.861]    ^
[2020-01-06T22:00:12.861] 
[2020-01-06T22:00:12.861] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 17: unable to resolve class org.openqa.selenium.WebElement
[2020-01-06T22:00:12.861]  @ line 17, column 1.
[2020-01-06T22:00:12.861]    import org.openqa.selenium.WebElement as WebElement
[2020-01-06T22:00:12.861]    ^
[2020-01-06T22:00:12.861] 
[2020-01-06T22:00:12.861] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 15: unable to resolve class org.openqa.selenium.Keys
[2020-01-06T22:00:12.861]  @ line 15, column 1.
[2020-01-06T22:00:12.861]    import org.openqa.selenium.Keys as Keys
[2020-01-06T22:00:12.861]    ^
[2020-01-06T22:00:12.861] 
[2020-01-06T22:00:12.861] 3 errors
[2020-01-06T22:00:12.861] 
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-06T22:00:12.861] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-06T22:00:12.861] 	at TempTestSuite1578348007621.run(TempTestSuite1578348007621.groovy:36)
[2020-01-06T22:00:12.861] 
[2020-01-06T22:00:12.901] 2020-01-06 22:00:12.901 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/Smoke Test - Jenkins/Jenkins - Web Test
[2020-01-06T22:00:12.903] Caught: java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-06T22:00:12.906] java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestCaseExecutor.postExecution(TestCaseExecutor.java:193)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:258)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-06T22:00:12.906] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-06T22:00:12.906] 	at TempTestSuite1578348007621.run(TempTestSuite1578348007621.groovy:36)
[2020-01-06T22:00:12.907] Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
[2020-01-06T22:00:12.907] 	... 8 more
[2020-01-06T22:00:12.959] Launcher status after execution process completed: Running
[2020-01-06T22:00:13.324] Start writing execution.uuid file to folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007
[2020-01-06T22:00:13.328] Start generating JUnit report folder at: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007...
[2020-01-06T22:00:13.354] JUnit report were generated at folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007
[2020-01-06T22:00:13.372] Uploading report to Katalon TestOps...
[2020-01-06T22:00:13.373] Start sending test result to Katalon TestOps
[2020-01-06T22:00:13.639] Uploading log files of test suite
[2020-01-06T22:00:13.732] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007/execution.uuid
[2020-01-06T22:00:14.126] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007/execution0.log
[2020-01-06T22:00:14.355] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007/execution.properties
[2020-01-06T22:00:14.548] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200106_220007/Sanity - CA Website/20200106_220007/JUnit_Report.xml
[2020-01-06T22:00:14.755] Katalon TestOps: Start uploading report to Katalon TestOps server: https://analytics.katalon.com

Below is the command I used in command line :

In this, I am pulling code from a folder on same machine

./katalonc -noSplash -runMode=console -projectPath="/home/manpreet/Downloads/webautomation-New_Website_Setup/Web_Automation.prj" -retry=0 -testSuitePath="Test Suites/Sanity - CA Website" -executionProfile="PROD_CA" -browserType="Chrome (headless)" -apiKey="xxxxxxxxxxxxxxxxxxxxxx"

On Jenkins job :

Code is pulled from a git branch

 ./katalonc -noSplash -runMode=console -retry=0 -testSuitePath="Test Suites/Sanity - CA Website" -executionProfile="PROD_CA" -browserType="Chrome (headless)" -apiKey="xxxxxxxxxxxxxxxxxxxxxx"

Below is the Jenkins configuration :

Below is the Open JDK Status on the Jenkins machine.

Hi @manpreet.mukkar

Could you try delete the Lib and bin folders in your project and execute with Jenkins again.

1 Like

@ThanhTo I tried this but it is the same result.

[2020-01-07T17:42:45.195] 2020-01-07 17:42:44.821 INFO  c.k.katalon.core.main.TestSuiteExecutor  - START Test Suites/Sanity - CA Website
[2020-01-07T17:42:45.195] 2020-01-07 17:42:44.863 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostName = jenkins - ip-xxxxxxxxx.us-east-2.compute.internal
[2020-01-07T17:42:45.195] 2020-01-07 17:42:44.864 INFO  c.k.katalon.core.main.TestSuiteExecutor  - os = Linux 64bit
[2020-01-07T17:42:45.195] 2020-01-07 17:42:44.864 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostAddress = xxxxxxxxx
[2020-01-07T17:42:45.195] 2020-01-07 17:42:44.865 INFO  c.k.katalon.core.main.TestSuiteExecutor  - katalonVersion = 7.2.1.1
[2020-01-07T17:42:45.253] 2020-01-07 17:42:45.253 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
[2020-01-07T17:42:45.253] 2020-01-07 17:42:45.253 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/Smoke Test - Jenkins/Jenkins - Web Test
[2020-01-07T17:42:45.940] 2020-01-07 17:42:45.938 ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ Test Cases/Smoke Test - Jenkins/Jenkins - Web Test FAILED.
[2020-01-07T17:42:45.940] Reason:
[2020-01-07T17:42:45.940] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[2020-01-07T17:42:45.940] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 16: unable to resolve class org.openqa.selenium.JavascriptExecutor
[2020-01-07T17:42:45.940]  @ line 16, column 1.
[2020-01-07T17:42:45.940]    import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor
[2020-01-07T17:42:45.940]    ^
[2020-01-07T17:42:45.940] 
[2020-01-07T17:42:45.940] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 17: unable to resolve class org.openqa.selenium.WebElement
[2020-01-07T17:42:45.940]  @ line 17, column 1.
[2020-01-07T17:42:45.940]    import org.openqa.selenium.WebElement as WebElement
[2020-01-07T17:42:45.940]    ^
[2020-01-07T17:42:45.940] 
[2020-01-07T17:42:45.940] file:/var/lib/jenkins/workspace/Katalon%20Test%20-%20CA%20Website/Scripts/Smoke%20Test%20-%20Jenkins/Jenkins%20-%20Web%20Test/Script1576274155150.groovy: 15: unable to resolve class org.openqa.selenium.Keys
[2020-01-07T17:42:45.940]  @ line 15, column 1.
[2020-01-07T17:42:45.940]    import org.openqa.selenium.Keys as Keys
[2020-01-07T17:42:45.940]    ^
[2020-01-07T17:42:45.940] 
[2020-01-07T17:42:45.940] 3 errors
[2020-01-07T17:42:45.940] 
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-07T17:42:45.940] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-07T17:42:45.940] 	at TempTestSuite1578418960978.run(TempTestSuite1578418960978.groovy:36)
[2020-01-07T17:42:45.940] 
[2020-01-07T17:42:45.973] 2020-01-07 17:42:45.973 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/Smoke Test - Jenkins/Jenkins - Web Test
[2020-01-07T17:42:45.981] Caught: java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-07T17:42:45.981] java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestCaseExecutor.postExecution(TestCaseExecutor.java:193)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:258)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-07T17:42:45.981] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-07T17:42:45.981] 	at TempTestSuite1578418960978.run(TempTestSuite1578418960978.groovy:36)
[2020-01-07T17:42:45.981] Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
[2020-01-07T17:42:45.981] 	... 8 more
[2020-01-07T17:42:46.008] Launcher status after execution process completed: Running
[2020-01-07T17:42:46.351] Start writing execution.uuid file to folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240
[2020-01-07T17:42:46.352] Start generating JUnit report folder at: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240...
[2020-01-07T17:42:46.381] JUnit report were generated at folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240
[2020-01-07T17:42:46.385] Uploading report to Katalon TestOps...
[2020-01-07T17:42:46.386] Start sending test result to Katalon TestOps
[2020-01-07T17:42:46.623] Uploading log files of test suite
[2020-01-07T17:42:46.735] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240/execution.uuid
[2020-01-07T17:42:47.089] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240/execution0.log
[2020-01-07T17:42:47.321] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240/execution.properties
[2020-01-07T17:42:47.562] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200107_174240/Sanity - CA Website/20200107_174240/JUnit_Report.xml
[2020-01-07T17:42:47.858] Katalon TestOps: Start uploading report to Katalon TestOps server: https://analytics.katalon.com
[2020-01-07T17:42:48.159] Katalon TestOps - Execution URL: https://analytics.katalon.com/from-ks/execution-result?teamId=11834&projectId=21622&id=5130836
[2020-01-07T17:42:48.159] End sending to Katalon TestOps
[2020-01-07T17:42:48.159] Report has been sent to Katalon TestOps
[2020-01-07T17:42:57.172] 
[2020-01-07T17:42:57.172] --------------------------------------------------------------------------------
[2020-01-07T17:42:57.172] Test Suites/Sanity - CA Website - Chrome (headless) - 20200107_174240..1/1(100%)
[2020-01-07T17:42:57.172] --------------------------------------------------------------------------------
[2020-01-07T17:42:57.172] 
[2020-01-07T17:42:57.172] Execution completed. Exit code: 2.
[2020-01-07T17:42:57.172] Start clean up session
[2020-01-07T17:42:57.173] End check license task
[2020-01-07T17:42:57.173] End clean up session
[2020-01-07T17:42:57.173] Start release license task
[2020-01-07T17:42:57.494] License released
[2020-01-07T17:42:57.494] End release license task
[2020-01-07T17:42:57.495] All launchers terminated
Build step 'Execute Katalon Studio Tests' marked build as failure
Finished: FAILURE

Here is how my project look like in Git

Hi @manpreet.mukkar

Please try @devalex88’s solution:

and let me know if that helps

1 Like

@ThanhTo @devalex88

I am able to get rid of three errors but not sure how I can get rid below errors :

java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriverException

java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-08T18:05:14.487] java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy

java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy

[2020-01-08T18:05:14.441] java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriverException
[2020-01-08T18:05:14.441] 	at Jenkins - Web Test.run(Jenkins - Web Test:20)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-08T18:05:14.441] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-08T18:05:14.441] 	at TempTestSuite1578506710588.run(TempTestSuite1578506710588.groovy:36)
[2020-01-08T18:05:14.441] 
[2020-01-08T18:05:14.472] 2020-01-08 18:05:14.472 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/Smoke Test - Jenkins/Jenkins - Web Test
[2020-01-08T18:05:14.486] Caught: java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-08T18:05:14.487] java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-01-08T18:05:14.487] 	at com.kms.katalon.core.main.TestCaseExecutor.postExecution(TestCaseExecutor.java:193)
[2020-01-08T18:05:14.487] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:258)
[2020-01-08T18:05:14.487] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-01-08T18:05:14.487] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-01-08T18:05:14.487] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-01-08T18:05:14.488] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-01-08T18:05:14.488] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-01-08T18:05:14.488] 	at TempTestSuite1578506710588.run(TempTestSuite1578506710588.groovy:36)
[2020-01-08T18:05:14.488] Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
[2020-01-08T18:05:14.488] 	... 8 more
[2020-01-08T18:05:14.510] Launcher status after execution process completed: Running
[2020-01-08T18:05:14.941] Start writing execution.uuid file to folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510
[2020-01-08T18:05:14.941] Start generating JUnit report folder at: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510...
[2020-01-08T18:05:14.973] JUnit report were generated at folder: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510
[2020-01-08T18:05:14.979] Uploading report to Katalon TestOps...
[2020-01-08T18:05:14.979] Start sending test result to Katalon TestOps
[2020-01-08T18:05:15.305] Uploading log files of test suite
[2020-01-08T18:05:15.406] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510/execution.uuid
[2020-01-08T18:05:15.650] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510/execution0.log
[2020-01-08T18:05:15.843] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510/execution.properties
[2020-01-08T18:05:16.009] Sending file: /var/lib/jenkins/workspace/Katalon Test - CA Website/Reports/20200108_180510/Sanity - CA Website/20200108_180510/JUnit_Report.xml

Hi @manpreet.mukkar

Please provide the test script of Test Case Jenkins - Web Test.
Also, try to search for all references of BrowserMobProxy in your project and remove them.

@ThanhTo

I have attached the main script, There are 5 other small scripts that are called within the main script, Sorry main script is very long.

Jenkins - Web Test.txt (34.4 KB)
2_Test.txt (3.4 KB)
4_Test.txt (3.3 KB)
5_Test.txt (2.5 KB)
3_Test.txt (3.5 KB)
1_Test.txt (1.6 KB)

I changed the files extension to txt so that I can upload these.

I am also not able to find any reference in the scripts for BrowserMobProxy

@manpreet.mukkar

Have you tried to delete .classpath and .project files in your project also ?

Another possible solution is try to create a new project, and paste the Test Case / Test Objects / Test Suite from the old project to the new one, and execute on the new project.

@ThanhTo I have deleted classpath and .project files in my project but still the same.

If I create a new project will that impact the git repository I have been working on withing this existing project?

Hi @manpreet.mukkar

You can commit and push the relevant test cases (objects, suites, etc) to your repository. And then use Git integration to pull the repository into another Katalon project. Please refer to this: https://docs.katalon.com/katalon-studio/docs/git-integration.html

@ThanhTo Sorry for the delay in reply. I didn’t went ahead with creating a new project but instead created a cron job in Jenkins that basically calls a script file. The script file just go to Katalon Runtime engine directory and run a Katalon command from there. Then the Jenkins job check if the exit code is 0 to determine if the build is pass or not.

The only issue now is that I have to download the branch where Jenkins is running and cannot connect it to git so that upon every build it pulls updated code.

@ThanhTo If I want to remove BrowserMobProxy references then should I remove this

Screen Shot 2020-01-20 at 3.12.54 PM

from

Applications⁩ ▸ ⁨Katalon Studio⁩ ▸ ⁨Contents⁩ ▸ ⁨Eclipse⁩ ▸ ⁨configuration⁩ ▸ ⁨resources⁩ ▸ ⁨lib⁩ ??

@ThanhTo I created an entirely new project and copied pasted relevent test cases / suites / objects / profiles to new one and test it on local machine.

When I executed the same on Jenkins box it gave me the same error :slight_smile:

[2020-03-31T16:11:53.136] 
[2020-03-31T16:11:53.136] --------------------------------------------------------------------------------
[2020-03-31T16:11:53.136] Test Suites/Sanity - US Website - Chrome - 20200331_161151...............0/1(0%)
[2020-03-31T16:11:53.136] --------------------------------------------------------------------------------
[2020-03-31T16:11:53.136] 
[2020-03-31T16:11:55.991] 2020-03-31 16:11:55.987 INFO  c.k.katalon.core.main.TestSuiteExecutor  - START Test Suites/Sanity - US Website
[2020-03-31T16:11:56.055] 2020-03-31 16:11:56.055 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostName = jenkins - ip-xxx-xx-x-xxx.us-east-2.compute.internal
[2020-03-31T16:11:56.057] 2020-03-31 16:11:56.057 INFO  c.k.katalon.core.main.TestSuiteExecutor  - os = Linux 64bit
[2020-03-31T16:11:56.058] 2020-03-31 16:11:56.058 INFO  c.k.katalon.core.main.TestSuiteExecutor  - hostAddress = xxx.xx.x.xxx
[2020-03-31T16:11:56.059] 2020-03-31 16:11:56.059 INFO  c.k.katalon.core.main.TestSuiteExecutor  - katalonVersion = 7.2.1.1
[2020-03-31T16:11:56.529] 2020-03-31 16:11:56.528 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
[2020-03-31T16:11:56.530] 2020-03-31 16:11:56.528 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/Smoke Test - Jenkins/Jenkins - Web Test - Without Price Test
[2020-03-31T16:11:57.871] 2020-03-31 16:11:57.870 DEBUG .Jenkins - Web Test - Without Price Test - 1: openBrowser("")
[2020-03-31T16:11:57.918] 2020-03-31 16:11:57.916 ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ Test Cases/Smoke Test - Jenkins/Jenkins - Web Test - Without Price Test FAILED.
[2020-03-31T16:11:57.918] Reason:
[2020-03-31T16:11:57.918] java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriverException
[2020-03-31T16:11:57.918] 	at Jenkins - Web Test - Without Price Test.run(Jenkins - Web Test - Without Price Test:20)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-03-31T16:11:57.918] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-03-31T16:11:57.918] 	at TempTestSuite1585671111611.run(TempTestSuite1585671111611.groovy:36)
[2020-03-31T16:11:57.918] 
[2020-03-31T16:11:57.970] 2020-03-31 16:11:57.970 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/Smoke Test - Jenkins/Jenkins - Web Test - Without Price Test
[2020-03-31T16:11:57.981] Caught: java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-03-31T16:11:57.981] java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestCaseExecutor.postExecution(TestCaseExecutor.java:193)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:258)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
[2020-03-31T16:11:57.982] 	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
[2020-03-31T16:11:57.982] 	at TempTestSuite1585671111611.run(TempTestSuite1585671111611.groovy:36)
[2020-03-31T16:11:57.983] Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
[2020-03-31T16:11:57.983] 	... 8 more
[2020-03-31T16:11:58.031] Launcher status after execution process completed: Running
[2020-03-31T16:11:58.693] Start writing execution.uuid file to folder: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151
[2020-03-31T16:11:58.694] Start generating JUnit report folder at: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151...
[2020-03-31T16:11:58.735] JUnit report were generated at folder: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151
[2020-03-31T16:11:58.751] Uploading report to Katalon TestOps...
[2020-03-31T16:11:58.752] Start sending test result to Katalon TestOps
[2020-03-31T16:11:59.182] Uploading log files of test suite
[2020-03-31T16:11:59.283] Sending file: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151/execution.uuid
[2020-03-31T16:11:59.625] Sending file: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151/execution0.log
[2020-03-31T16:11:59.805] Sending file: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151/execution.properties
[2020-03-31T16:12:00.034] Sending file: /var/lib/jenkins/workspace/Katalon Test - US Website - Engine/Reports/20200331_161151/Sanity - US Website/20200331_161151/JUnit_Report.xml
[2020-03-31T16:12:00.217] Katalon TestOps: Start uploading report to Katalon TestOps server: https://analytics.katalon.com
[2020-03-31T16:12:00.854] Katalon TestOps - Execution URL: https://analytics.katalon.com/from-ks/execution-result?teamId=11834&projectId=21622&id=6005008
[2020-03-31T16:12:00.854] End sending to Katalon TestOps
[2020-03-31T16:12:00.854] Report has been sent to Katalon TestOps
[2020-03-31T16:12:08.137] 
[2020-03-31T16:12:08.137] --------------------------------------------------------------------------------
[2020-03-31T16:12:08.137] Test Suites/Sanity - US Website - Chrome - 20200331_161151.............1/1(100%)
[2020-03-31T16:12:08.137] --------------------------------------------------------------------------------
[2020-03-31T16:12:08.137] 
[2020-03-31T16:12:08.137] Execution completed. Exit code: 2.
[2020-03-31T16:12:08.138] Start clean up session
[2020-03-31T16:12:08.138] End check license task
[2020-03-31T16:12:08.138] End clean up session
[2020-03-31T16:12:08.138] Start release license task
[2020-03-31T16:12:08.653] License released
[2020-03-31T16:12:08.653] End release license task
[2020-03-31T16:12:08.654] All launchers terminated
Build step 'Execute Katalon Studio Tests' marked build as failure
Finished: FAILURE

@devalex88 @ThanhTo @huynguyen @Jass @duyluong Please help me over here.This has become a very critical piece for me.

@Russ_Thomas @Brandon_Hein Can you please help me here. This is still a blocker for me.

It’s impossible to tell from the .txt files for your scripts that you linked, as they are not formatted, and do not have line numbers. Can you share what is happening at this point in your script?:

at Jenkins - Web Test - Without Price Test.run(Jenkins - Web Test - Without Price Test:20)

i.e. line 20 of the “Jenkins - Web Test - Without Price Test” script.

2 Likes

@Brandon_Hein I will get back you the details soon.

@Brandon_Hein I don’t think I would need to fix this issue as we are going to change the approach how we run our sanity test cases. Thanks for your help.