Jenkins katalon command line Issue

Using windows 10. Generated command line in Katalon for a testsuite with 1 testcase. Ran it from command prompt it works. Copied the same command line to Jenkins build step. Able to see in jenkins build console it is running the command but nothing happens it hangs. What is the reason for hanging?

Provided the jenkins console output below

In progressConsole Output

Started by user AravBuilding in workspace C:\Program Files (x86)\Jenkins\workspace\katalon-test[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] Done[katalon-test] $ cmd /c call C:\WINDOWS\TEMP\jenkins699346261988837628.batC:\Program Files (x86)\Jenkins\workspace\katalon-test>c:C:\Program Files (x86)\Jenkins\workspace\katalon-test>cd  "c:\arav\install\katalon\Katalon_Studio_Windows_64-5.6.1" c:\arav\install\katalon\Katalon_Studio_Windows_64-5.6.1>katalon -noSplash  -runMode=console -consoleLog -noExit -projectPath="C:\arav\st-ou_testing\oup-katalon\oup-katalon.prj" -retry=0 -testSuitePath="Test Suites/Coupon" -executionProfile="default" -browserType="Chrome" 

See your issue here but there is no answer yet.

Note: the command should NOT include the -noExit and -consoleLog parameters so that CI logs can be displayed directly on the job view.

1 Like

I am facing the same issue.
katalon -noSplash -runMode=console -consoleLog -projectPath=“C:\Users\ZoyaJaveed\Katalon Studio\ITG\ITG.prj” -statusDelay=5 -retry=0 -testSuitePath=“Test Suites/ITGSuite” -executionProfile=“default” -browserType=“Chrome”

I tried by removing -consoleLog as well, yet it hangs.

I used the below syntax it works

**katalon -runMode=console -projectPath=“C:\arav\st-ou_testing\oup-katalon\oup-katalon.prj” -retry=0 -testSuitePath=“Test Suites/Coupon” -browserType=“Chrome” **

But sometimes the run fails i get the below error. Reading from earlier forum it was mentioned that latest katalon IDE has a fix for it. I use the latest version 5.6.3
but i get the below error sometimes. How do i fix it?

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

C:\arav\st-ou_testing\oup-katalon\Libs\TempTestSuite1536196723325.groovy: 14: unable to resolve class internal.GlobalVariable

** @ line 14, column 1.**

** import internal.GlobalVariable as GlobalVariable**

** ^**

1 error

Can anyone help me regarding this error?

Have a look at the following long post:

We are longing for v5.7 which is planned to fix the ‘import internal.GlobalVariable as GlobalVariable’ problem.

Thanks for the info. Upgraded to V5.7. TestSuite runs successfully but i still see the below error message in jenkins console output.

/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/common/DbFunctions.groovy: 23 Groovy:unable to resolve class internal.GlobalVariable/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/common/OrderUp.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/mysql/TestSql.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/mysql/keywordgen.groovy: 21 Groovy:unable to resolve class internal.GlobalVariable/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/mysqldoc/TestMySqlDoc.groovy: 21 Groovy:unable to resolve class internal.GlobalVariable/C%%arav%st-ou_testing%oup-katalon%oup-katalon.prj/Keywords/newpackage/newkeyword.groovy: 22 Groovy:unable to resolve class internal.GlobalVariable
1 Like

I would recommend you not to be bothered with the messages any longer as your TestSuite runs successfully.

I presume that the Keywords/common/DbFunctions.groovy file contains a line of

import internal.GlobalVariable

but the code in DbFucntions.groovy does NOT use the GlobalVariable. Therefore you can safely ignore the messages.

Global variables are used in the DbFucntions.groovy file
String dbUrl= “jdbc:mysql://” + Globals.DB_SERVER_IP + “:” + Globals.DB_SERVER_PORT + “/” + Globals.DB_NAME;

Not sure what is causing it. Anyway testcase is moving on. Will Ignore it.

I suppose that Globals.DB_SERVER_IP in the DbFunctions.groovy file is another entity, not a property contained in the internal.GlobalVariables.