Problem adding keyword to a katalon project running with Jenkins

We have a project in Katalon that we launch every night using Jenkins. We have modified the project by adding a new keyword. When launching the project automatically with Jenkins, we get an error in the reference we make to this keyword in the testcase that we had already added to the project. If we run the project manually from Katalon, it does not give us any error and the test is launched correctly.
I give you an example of what we have done. It’s very simple, but we don’t see if we are missing something or if something is missing to add in the Jenkins execution.

We have the keyword defined as follows:

And in the testcase we refer to it like this:

When the project is executed in Jenkins, it gives us this error and the execution of the tests stops:
Test Cases/TestCaseCompleto FAILED because (of) (Stack trace: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/srv/jenkins/workspace/Test_Pruebas/Pruebas/Scripts/CompletarTest/Script1556183093928.groovy: 32: unable to resolve class utilidades5.entidades.Prueba

  • @ line 21, column 1.*
  • import utilidades5.entidades.Prueba as Prueba*
  • ^*

1 error

  • at org.codehaus.groovy.control.ErrorCollector.failIfErrors(*
  • at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(*
  • at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(*
  • at org.codehaus.groovy.control.CompilationUnit.compile(*
  • at groovy.lang.GroovyClassLoader.doParseClass(*
  • at groovy.lang.GroovyClassLoader.parseClass(*
  • at com.kms.katalon.core.main.ScriptEngine.getScript(*
  • at*
  • at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(*
  • at com.kms.katalon.core.main.TestCaseExecutor.runScript(*
  • at com.kms.katalon.core.main.TestCaseExecutor.doExecute(*
  • at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(*
  • at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(*
  • at com.kms.katalon.core.main.TestCaseExecutor.execute(*
  • at com.kms.katalon.core.main.TestCaseMain.runTestCase(*
  • at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60)*
  • at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$*
  • at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)*
  • at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)*

Can someone help us? Thanks!

Do you use Git? Does your job in Jenkins clone the project out of a Git repository?

If yes, how is .gitignore file is coded?

The .gitignore should have the following 3 lines:


Especially I have a doubt that your .gitignore file does not have a line of


In the .cache directory, the compiled class files of “Keywords” are saved.
If your .gitignore misses, the .cache contents should have been inluded in the Git reportory, and will be transfered to the Jenkins job. It is likely that the contents of .cache is out of sync with the program source code — this would cause problem.

Sorry, I forgot to add it in the first post. Yes, we are using GIT and we already have the 3 lines you mentioned in .gitignore.


Please make sure that .cached is NOT stored in the remote git repository already.

If you find .cache stored in the remote git repository already, you should do the following:

$ cd $projectDir
$ git rm -r --cached .cached
$ git rm -r --cached bin
$ git rm -r --cached Libs
$ git push

This will purge the contents of the .cached directory which were already stored in the repository.

Thanks, solved!