存储库代码https://github.com/katalon-studio-samples/katalon-web-automation失败,并出现链式异常java.lang.NoClassDefFoundError:net / lightbody / bmp / BrowserMobProxy和java.lang.NoClassDefFoundError:org / openqa / selenium / WebElement
它可以在shell中使用命令
/home/prakash/personalreason/Katalon_Studio_Linux_64-6.2.2/./katalon -noSplash -data=/home/prakash/katalon -runMode=console -consoleLog -projectPath="/var/lib/jenkins/workspace/katalon-web-automation/Katalon Web Tutorial.prj" -retry=0 -testSuitePath="Test Suites/New Test Suite" -browserType="Chrome (headless)"
我的詹金斯的执行外壳读取
#export DISPLAY=localhost:10.0
Xvfb :0 >& /dev/null &
export DISPLAY=:0
sudo chmod 777 .
sudo rm -rf /var/lib/jenkins/workspace/katalon-web-automation/bin
sudo rm -rf /var/lib/jenkins/workspace/katalon-web-automation/Libs
/home/prakash/personalreason/Katalon_Studio_Linux_64-6.2.2/./katalon -noSplash -data=/home/prakash/katalon -runMode=console -consoleLog -projectPath="/var/lib/jenkins/workspace/katalon-web-automation/Katalon Web Tutorial.prj" -retry=0 -testSuitePath="Test Suites/New Test Suite" -browserType="Chrome (headless)"
预期结果
2019-07-25 18:14:03.291 INFO c.k.katalon.core.main.TestSuiteExecutor - --------------------
2019-07-25 18:14:03.292 INFO c.k.katalon.core.main.TestSuiteExecutor - END Test Suites/New Test Suite
2019-07-25 18:14:03.292 INFO c.k.katalon.core.main.TestSuiteExecutor - ====================
Launcher status after execution process completed: Running
Start writing execution.uuid file to folder: /home/prakash/personalreason/katalon-web-automation/Reports/New Test Suite/20190725_175941
For real-time monitoring and better reporting capabilities please integrate this project with Katalon Analytics (more details at https://docs.katalon.com/katalon-analytics/docs/integration-with-katalon-studio.html#enable-integration)
--------------------------------------------------------------------------------
Test Suites/New Test Suite - Chrome (headless) - 20190725_175941.....38/38(100%)
--------------------------------------------------------------------------------
实际结果
Test Suites/New Test Suite - Chrome (headless) - 20190725_191630........1/38(3%)
--------------------------------------------------------------------------------
2019-07-25 19:16:31.767 ERROR c.k.katalon.core.main.TestCaseExecutor - ❌ Test Cases/Custom Keyword Dropdown Values Verification/DropDown_Values_Alphabetical Order FAILED.
Reason:
java.lang.NoClassDefFoundError: org/openqa/selenium/WebElement
at DropDown_Values_Alphabetical Order.run(DropDown_Values_Alphabetical Order:10)
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 TempTestSuite1564062390358.run(TempTestSuite1564062390358.groovy:35)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.WebElement
at Script1502810910022.run(Script1502810910022.groovy:10)
... 13 more
Caught: java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
java.lang.NoClassDefFoundError: net/lightbody/bmp/BrowserMobProxy
at com.kms.katalon.core.main.TestCaseExecutor.postExecution(TestCaseExecutor.java:193)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:258)
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 TempTestSuite1564062390358.run(TempTestSuite1564062390358.groovy:35)
Caused by: java.lang.ClassNotFoundException: net.lightbody.bmp.BrowserMobProxy
... 8 more
Build step 'Execute Katalon Studio Tests' marked build as failure
Finished: FAILURE```