Unable to resolve class error, all tests failing after upgrading to 7.x

2019-10-29 15:11:57.276 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-10-29 15:11:57.276 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Page Health Check/Templates Page
2019-10-29 15:11:57.367 DEBUG testcase.Templates Page - 1: callTestCase(findTestCase(“Browser/Login”), [:], STOP_ON_FAILURE)
2019-10-29 15:11:57.423 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-10-29 15:11:57.423 INFO c.k.katalon.core.main.TestCaseExecutor - CALL Test Cases/Browser/Login
2019-10-29 15:11:57.514 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/Browser/Login FAILED.
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/home/jenkins/workspace/bp-logs-page-health/Scripts/Browser/Login/Script1563803702431.groovy: 15: unable to resolve class com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords
@ line 15, column 1.
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
^

1 error

at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
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.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
at Templates Page.run(Templates Page:16)
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 TempTestSuite1572376314481.run(TempTestSuite1572376314481.groovy:35)

Need help with this. Downgrading does not resolve the issue. What happened here?

Try this:

  1. Close Katalon and uncheck “Auto restore…”

  2. Go to your project folder and delete these highlighted files

  3. Open Katalon

  4. Open your project

1 Like

Are you running the project on Jenkins using KS 6.x’s console mode?

In KS 7, new Keyword classes for Windows app testing are added to test cases. Therefore, projects that are saved by KS 7 must be executed by Runtime Engine 7.

Hi,I came across the same issue below when running the testcases on jenkins using KS 6.x version.How do I resolve this issue…
Test Cases/UI/Pro/test_team FAILED.
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/tmp/katalon_execute/project/Scripts/UI/Pro/test_team/Script1560455841127.groovy: 9: unable to resolve class com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords
@ line 9, column 1.
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
^

1 error

at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
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:331)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:322)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:293)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:227)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1573714425150.run(TempTestSuite1573714425150.groovy:35)

Hi @swathi.mothkupally

Please remove the import statement from the script

import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows

This import only works on 7.0

Thank you will try that.

@ThanhTo and @Chris_Trevarthen we’re having a similar problem on the mac side with the groovy script not initializing before it can even call the test case.
Classpath problem on Mac

just to be clear, I won’t be able to run projects that are saved by KS 7 using KS6 or there’s a workaround?

1 Like

KS 7 adds some new import statements, please check listed errors in the Problems view and remove them manually.