Error when running a test case

I am trying to use BDD and Cucumber with Katalon for an existing web project. I read the doccumentation from https://docs.katalon.com/display/KD/BDD+Testing+Framework. When I am trying to run a feature file, I get the bellow error. Has anyone found a way to solve this?

09-17-2018 03:17:00 PM - [FAILED] - Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: Product)

09-17-2018 03:17:00 PM - [END] - End action : runFeatureFile

09-17-2018 03:17:00 PM - [FAILED] - Test Cases/Smoke Test/Login FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: Product)

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 Script1537184154599.run(Script1537184154599.groovy:16)

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)

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.TestCaseMain.runTestCase(TestCaseMain.java:99)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90)

at com.kms.katalon.core.main.TestCaseMain$runTestCase$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:149)

at TempTestCase1537186618129.run(TempTestCase1537186618129.groovy:22)

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)

)

09-17-2018 03:17:00 PM - [END] - End Test Case : Test Cases/Smoke Test/Login

Please provide your script also. By the way, this is the root cause:
Root cause: java.lang.NoClassDefFoundError: Product

Looks like you’ve used incorrect inputs of runFeatureFile keyword, so please help to provide more details about your script.

This is just a part of the script. I simplified so I wouldn’t put all code, but I get the same error.
http://cloud.screenpresso.com/C9vxc/2018-09-17_17h44_37.png

I have the same issue that I also posted here. http://forum.katalon.com/discussion/comment/22410#Comment_22410

So how do you run it? You run it using ‘runFeatureFile’ keyword or directly from a Feature File?

By the way, is it possible to send me your project so that I can try, just send to me privately :slight_smile:

Vinh Nguyen said:

By the way, is it possible to send me your project so that I can try, just send to me privately :slight_smile:

I get the same error both ways, using ‘runFeatureFile’ or directly from Feature File. I am sorry, I can’t send the project because it is the company project and has sensitive data.

So can you send me .classpath file from the project’s folder? It contains some information related to your issue according to my experiences.

Vinh Nguyen said:

So can you send me .classpath file from the project’s folder? It contains some information related to your issue according to my experiences.

I sent you the .classpath in private.

I have the same issue. It would be helpful if someone could provide a solution as I would need to integrate Cucumber into my project. Thx

Did anyone manage to find a solution to this problem? :slight_smile:

I encountered the similar issue and resolved it.

See the following: