cannot run katalon cucumber projet with KRE

Hello,
I’m having a problem with my Katalon project with Cucumber when I run it on my pipeline or even locally with the runtime engine. My project works correctly when I run my tests via Katalon Studio. I get this error message:
cucumber.runtime.CucumberException: Failed to instantiate class stepDefinition.communSteps
at cucumber.runtime.java.DefaultJavaObjectFactory.cacheNewInstance(DefaultJavaObjectFactory.java
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.Error: Unresolved compilation problem:
Groovy:unable to resolve class CustomKeywords
I think it’s a compilation problem, but I haven’t been able to fix it.
Has anyone else had the same problem please?

1 Like

Hi there, and thanks for posting in the Katalon community! :hugs:

To help you faster, please review our guide on Custom Keyword here: Introduction to custom keywords in Katalon Studio | Katalon Docs. Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Elly Tran

Can you refer and see if this helps BDD Project Example for Katalon Latest Version (v10.x.x and v9.x.x) - #3 by Elly_Tran

Hi @rihab.elloumi.ext,

Welcome to our community. Which KS version are you using? If not the latest, please help upgrade it and see if the problem stil there/

I suppose you have a Git repository where you saved your project to share.

Is the Keywords/CustomKeywords.groovy file commited and present in the repository?

I guess that you forgot to commit the file into the repository; so that the groovy file is missing when you run your tests in your pipleline with Runtime Engine.