Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: TestObject)

Am getting this error on 5.7.0 while during execution.

Feature file:

@tag

Feature: Title of your feature

I want to use this template for my feature file

@tag1

Scenario Outline: Title of your scenario outline

Given I want to log in to google  

Step definition :

class LoginStepDefination {

/**

* The step definitions below match with Katalon sample Gherkin steps

*/

//@Given(’^I want to log in to kepler$’)

@Given(“I want to log in to google”)

def I\_navigate\_to_google() {

     WebUI.openBrowser("https://www.google.com")

    //WebUI.waitForPageLoad(30)

}

After running the feature file I get this error:

Verification FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: TestObject)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)

at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:56)

at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)

at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:45)

at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:214)

at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:95)

at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)

at WSVerification1536351072091.run(WSVerification1536351072091:2)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)

at com.kms.katalon.core.main.WSVerificationExecutor.runScript(WSVerificationExecutor.java:145)

at com.kms.katalon.core.main.WSVerificationExecutor.doExecute(WSVerificationExecutor.java:139)

at com.kms.katalon.core.main.WSVerificationExecutor.processExecutionPhase(WSVerificationExecutor.java:122)

at com.kms.katalon.core.main.WSVerificationExecutor.accessMainPhase(WSVerificationExecutor.java:114)

at com.kms.katalon.core.main.WSVerificationExecutor.execute(WSVerificationExecutor.java:102)

at com.kms.katalon.core.main.TestCaseMain.runFeatureFile(TestCaseMain.java:129)

at com.kms.katalon.core.main.TestCaseMain$runFeatureFile$0.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)

at TempTempCase1536351069092.run(TempTempCase1536351069092.groovy:21)

at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)

at groovy.lang.GroovyShell.run(GroovyShell.java:518)

at groovy.lang.GroovyShell.run(GroovyShell.java:507)

at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)

at groovy.ui.GroovyMain.run(GroovyMain.java:384)

at groovy.ui.GroovyMain.process(GroovyMain.java:370)

at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)

at groovy.ui.GroovyMain.main(GroovyMain.java:109)

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.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)

at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)

)

4 Likes

I Faced the same issue when i tried to run the project from CMD>

Please help.

11-06-2018 05:01:11 PM - [FAILED] - Keyword runWithCucumberRunner was failed (Root cause: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed() is applicable for argument types: (java.lang.String) values: [These following reason:

[null]]11-06-2018 05:01:11 PM - [END] - End action : runWithCucumberRunner

Possible solutions: stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling), stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling, java.lang.String), stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling, java.lang.String, java.util.Map))

11-06-2018 05:01:11 PM - [FAILED] - Test Cases/Login FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Keyword runWithCucumberRunner was failed (Root cause: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed() is applicable for argument types: (java.lang.String) values: [These following reason:11-06-2018 05:01:11 PM - [END] - End Test Case : Test Cases/Login

[null]]

Possible solutions: stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling), stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling, java.lang.String), stepFailed(java.lang.String, com.kms.katalon.core.model.FailureHandling, java.lang.String, java.util.Map))

    at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

    at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)

    at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:56)

    at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)

    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runWithCucumberRunner(CucumberBuiltinKeywords.groovy:247)

    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runWithCucumberRunner$0.callStatic(Unknown Source)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:214)

    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runWithCucumberRunner(CucumberBuiltinKeywords.groovy:347)

    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runWithCucumberRunner.call(Unknown Source)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)

    at Script1541078930933.run(Script1541078930933.groovy:22)

    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)

    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)

    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)

    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)

11-06-2018 05:01:11 PM - [END] - End Test Suite : Test Suites/POC

    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)

    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)

    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)

    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:142)

    at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)

    at TempTestSuite1541516460667.run(TempTestSuite1541516460667.groovy:36)

    at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)

    at groovy.lang.GroovyShell.run(GroovyShell.java:518)

    at groovy.lang.GroovyShell.run(GroovyShell.java:507)

    at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)

    at groovy.ui.GroovyMain.run(GroovyMain.java:384)

    at groovy.ui.GroovyMain.process(GroovyMain.java:370)

    at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)

    at groovy.ui.GroovyMain.main(GroovyMain.java:109)

    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.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)

    at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)

Can you help to provide your script?

Kindly find the project.
https://drive.google.com/open?id=18upvos5VRPVDGMSLjHOltz3kgfJNsQpQ

Did the above (Nov 6) post ever get resolved?

I’m get the same error message using runWithCucumberRunner. Previous to that I was trying to use the runFeatureFile command and was getting the error message below. I should note I could successfully run it in my Windows environment. However, we check the code into github and then use Travis CI to build our application (which uses a Linux environment), installs Katalon and runs my test suite (which calls runFeatureFile). I’ve tried running it without using cucumber and was able to get a similar non-cucumber testsuite working. It’d be nice to use cucumber, but may have to drop it if we can’t resolve this issue.

2018-12-18 00:10:19.083 INFO c.k.katalon.core.main.TestSuiteExecutor - START Test Suites/Run OCWA test cases
2018-12-18 00:10:19.249 INFO c.k.katalon.core.main.TestSuiteExecutor - hostName = travis - travis-job-fb886e3b-bdfe-4114-8575-6e946785e1be
2018-12-18 00:10:19.252 INFO c.k.katalon.core.main.TestSuiteExecutor - os = Linux 64bit
2018-12-18 00:10:19.266 INFO c.k.katalon.core.main.TestSuiteExecutor - hostAddress = 127.0.1.1
2018-12-18 00:10:19.271 INFO c.k.katalon.core.main.TestSuiteExecutor - katalonVersion = 5.9.0.1
2018-12-18 00:10:19.762 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2018-12-18 00:10:19.763 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Requester/Run cucumber tests
UPDATE_RECORD Test Cases/Requester/Run cucumber tests
2018-12-18 00:10:20.235 DEBUG testcase.Run cucumber tests - 1: runFeatureFile(“Include/features/requester/draft_requests.feature”, STOP_ON_FAILURE)
2018-12-18 00:10:20.323 INFO c.k.k.c.c.k.CucumberBuiltinKeywords - Starting run keyword runFeatureFile: ‘Include/features/requester/draft_requests.feature’ and extract report to folder: ‘/home/travis/build/bcgov/OCWA/ui-tests/Reports/Run OCWA test cases/20181218_001015/cucumber_report/1545091820314’…
2018-12-18 00:10:21.054 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Keyword runFeatureFile was failed (Root cause: java.lang.StackOverflowError)
2018-12-18 00:10:21.066 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: runFeatureFile(“Include/features/requester/draft_requests.feature”, STOP_ON_FAILURE) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.StackOverflowError)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:56)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:46)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at Run cucumber tests.run(Run cucumber tests:31)
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:321)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)
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:149)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1545091815841.run(TempTestSuite1545091815841.groovy:36)

Full log here: https://travis-ci.org/bcgov/OCWA/builds/469285537
Code is here: https://github.com/bcgov/OCWA/tree/feature/testing/ui-tests

Solved my issue. We were installing Katalon in a /home/user directory. After changing the installation directory to be usr/local/bin it worked. No idea why.

We got the idea of changing the installation directory from here: https://serverfault.com/questions/918668/katalon-studio-console-mode-fails-when-started-by-cron-on-linux

1 Like

I encountered the similar issue and resolved it. See the following:

Running Katalon Studio 7.2.1 on Ubuntu 19.10 here.

Putting a symbolic link to katalon executable in /usr/local/bin worked fine.

$ sudo ln -s ~/<katalon extracted folder goes here>/katalon /usr/local/bin/katalon