Hello,
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(ErrorCollector.java:310)*
- at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:946)*
- at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)*
- at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:542)*
- at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)*
- at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)*
- at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:188)*
- 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.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60)*
- at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)*
- 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!