Katalon Studio CLI not exiting at the end of test suite execution

I’m trying to finalize running a Katalon Studio iOS test suite in a Team City build step. I was able to get everything running, however the cli test suite runner never stops its execution.

Currently my cli command looks like this.

/Applications/Katalon\ Studio.app/Contents/MacOS/katalon
–args -noSplash -runMode=console
-retryFailedTestCases=false
-retry=0
-projectPath="%teamcity.build.workingDir%/katalon/katalon-ipad_tests/MY_APP.prj"
-reportFolder “Reports/%system.teamcity.buildType.id%/%build.number%”
-g_appPath=%teamcity.build.workingDir%/app/Debug-iphonesimulator/MY_APP.app
-testSuitePath=“Test Suites/All” -executionProfile=“Test Server”
-deviceId=“A40EE165-393B-445C-9780-30FEFB805BAA” -browserType=“iOS”

I use a custom build path for the application, so I put the application location in a global variable(g_appPath) so i can override it with the custom location in Team City

At the end of the test suite execution this is the behavior I’m seeing

[17:05:13] : [Step 2/2] 2019-02-26 17:05:13.151 INFO c.k.katalon.core.main.TestSuiteExecutor - --------------------
[17:05:13] : [Step 2/2] 2019-02-26 17:05:13.151 INFO c.k.katalon.core.main.TestSuiteExecutor - END Test Suites/All
[17:05:13] : [Step 2/2] 2019-02-26 17:05:13.151 INFO c.k.katalon.core.main.TestSuiteExecutor - ====================
[17:05:13] : [Step 2/2]
[17:05:13] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:13] : [Step 2/2] Test Suites/All - iOS - A40EE165-393B-445C-9780-30FEFB805BAA - 20190226_145312…
[17:05:13] : [Step 2/2] …59/59(100%)
[17:05:13] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:13] : [Step 2/2]
[17:05:28] : [Step 2/2]
[17:05:28] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:28] : [Step 2/2] Test Suites/All - iOS - A40EE165-393B-445C-9780-30FEFB805BAA - 20190226_145312…
[17:05:28] : [Step 2/2] …59/59(100%)
[17:05:28] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:28] : [Step 2/2]
[17:05:43] : [Step 2/2]
[17:05:43] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:43] : [Step 2/2] Test Suites/All - iOS - A40EE165-393B-445C-9780-30FEFB805BAA - 20190226_145312…
[17:05:43] : [Step 2/2] …59/59(100%)
[17:05:43] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:43] : [Step 2/2]
[17:05:58] : [Step 2/2]
[17:05:58] : [Step 2/2] --------------------------------------------------------------------------------
[17:05:58] : [Step 2/2] Test Suites/All - iOS - A40EE165-393B-445C-9780-30FEFB805BAA - 20190226_145312…
[17:05:58] : [Step 2/2] …59/59(100%)
[17:05:58] : [Step 2/2] --------------------------------------------------------------------------------

This repeats about every 15 seconds. I’ve left it run over a 3 day weekend and it was still doing this on Monday morning when I logged back in.

I feel like i’m missing something on my CLI command, but if anyone has any insight on this I would appreciate it.

I have the same issue on macos, checking the running Katalon process I see it’s “Not Responding”.
ctrl+c kills it.


Test Suites/DPP_LOGIN_LOGOUT - Chrome - 20190426_184655…0/1(0%)

2019-04-26 18:46:56.661 INFO c.k.katalon.core.main.TestSuiteExecutor - START Test Suites/DPP_LOGIN_LOGOUT
2019-04-26 18:46:56.696 INFO c.k.katalon.core.main.TestSuiteExecutor - hostName = wowbagger - 10.211.55.2
2019-04-26 18:46:56.697 INFO c.k.katalon.core.main.TestSuiteExecutor - os = Mac OS X 64bit
2019-04-26 18:46:56.697 INFO c.k.katalon.core.main.TestSuiteExecutor - hostAddress = 10.211.55.2
2019-04-26 18:46:56.698 INFO c.k.katalon.core.main.TestSuiteExecutor - katalonVersion = 6.1.2.2
2019-04-26 18:46:56.829 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-04-26 18:46:56.829 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/dpp.dev.dpp.dileoz.network login-logout
2019-04-26 18:46:57.037 DEBUG t.d.dev.dpp.dileoz.network login-logout - 1: openBrowser("")
2019-04-26 18:46:57.187 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
2019-04-26 18:46:57.204 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 seconds
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 18936
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Apr 26, 2019 6:46:58 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
2019-04-26 18:46:58.908 INFO c.k.k.core.webui.driver.DriverFactory - sessionId = 2e6bb06838b187e9dba0fcd9f4518291
2019-04-26 18:46:58.930 INFO c.k.k.core.webui.driver.DriverFactory - browser = Chrome 74.0.3729.108
2019-04-26 18:46:58.930 INFO c.k.k.core.webui.driver.DriverFactory - platform = Mac OS X
2019-04-26 18:46:58.932 INFO c.k.k.core.webui.driver.DriverFactory - seleniumVersion = 3.7.1
2019-04-26 18:46:58.933 INFO c.k.k.core.webui.driver.DriverFactory - proxyInformation = ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}
2019-04-26 18:46:58.935 DEBUG t.d.dev.dpp.dileoz.network login-logout - 2: navigateToUrl(“https://dpp.dev.dpp.dileoz.network/”)
2019-04-26 18:46:59.330 DEBUG t.d.dev.dpp.dileoz.network login-logout - 3: delay(1)
2019-04-26 18:47:00.351 DEBUG t.d.dev.dpp.dileoz.network login-logout - 4: click(findTestObject(“Object Repository/Page_Dileoz HR - DILEOZ_DEV/img”))
2019-04-26 18:47:01.648 DEBUG t.d.dev.dpp.dileoz.network login-logout - 5: delay(1)
2019-04-26 18:47:02.654 DEBUG t.d.dev.dpp.dileoz.network login-logout - 6: setText(findTestObject(“Object Repository/Page_DPP - DILEOZ_DEV/input_Gebruiker_loginFormusern”), “USERNAME”)
2019-04-26 18:47:02.824 DEBUG t.d.dev.dpp.dileoz.network login-logout - 7: delay(1)
2019-04-26 18:47:03.832 DEBUG t.d.dev.dpp.dileoz.network login-logout - 8: setEncryptedText(findTestObject(“Object Repository/Page_DPP - DILEOZ_DEV/input_Wachtwoord_loginFormpass”), “FqA0LMa4cu4=”)
2019-04-26 18:47:03.949 DEBUG t.d.dev.dpp.dileoz.network login-logout - 9: delay(1)
2019-04-26 18:47:04.956 DEBUG t.d.dev.dpp.dileoz.network login-logout - 10: click(findTestObject(“Object Repository/Page_DPP - DILEOZ_DEV/input_Onthouden_loginFormlogin”))
2019-04-26 18:47:09.349 DEBUG t.d.dev.dpp.dileoz.network login-logout - 11: delay(1)
2019-04-26 18:47:10.356 DEBUG t.d.dev.dpp.dileoz.network login-logout - 12: click(findTestObject(“Object Repository/Page_Payroll Console/span_dpp_local_admindileoz.com”))
2019-04-26 18:47:10.409 DEBUG t.d.dev.dpp.dileoz.network login-logout - 13: delay(1)


Test Suites/DPP_LOGIN_LOGOUT - Chrome - 20190426_184655…0/1(0%)

2019-04-26 18:47:11.412 DEBUG t.d.dev.dpp.dileoz.network login-logout - 14: click(findTestObject(“Object Repository/Page_Payroll Console/span_Log out”))
2019-04-26 18:47:11.465 DEBUG t.d.dev.dpp.dileoz.network login-logout - 15: delay(1)
2019-04-26 18:47:12.472 DEBUG t.d.dev.dpp.dileoz.network login-logout - 16: closeBrowser()
2019-04-26 18:47:12.572 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/dpp.dev.dpp.dileoz.network login-logout
2019-04-26 18:47:12.590 INFO c.k.katalon.core.main.TestSuiteExecutor - --------------------
2019-04-26 18:47:12.591 INFO c.k.katalon.core.main.TestSuiteExecutor - END Test Suites/DPP_LOGIN_LOGOUT
2019-04-26 18:47:12.591 INFO c.k.katalon.core.main.TestSuiteExecutor - ====================


Test Suites/DPP_LOGIN_LOGOUT - Chrome - 20190426_184655…1/1(100%)

Hi @larsvancasteren,

Please provide these information to help us investigate the issue better:

  • The command line arguments.
  • Did you run the command on local machine or via Jenkins or TeamCity?
  • Is the running machine using by one and multiple users?

Thanks.

Hi @duyluong Thanks for your reply!

I executed it locally from my laptop with:

./katalon -runMode=console -consoleLog -noExit -projectPath="/Users/wowbagger/Katalon Studio/TEST DPP LOGIN/TEST_DPP_LOGIN.prj" -retr0 -testSuitePath=“Test Suites/DPP_LOGIN_LOGOUT” -browserType= “Chrome”

Both with Chrome or Chrome (headless) generates the same result.

I’m installing latest on CentOS7 to see if it behaves the same way.

Hi @larsvancasteren,

Please remove the -noExit parameter, it should use for debugging only and cause katalon process didn’t end.

Thanks.

Ouch… that’s what you get on a Friday evening… :flushed:
Works perfectly now on macos & centos.

Thanks for helping me out :wink:

Hi @Frank_Keefer,

Did you try to run the command on your local machine (not the Team City)? Does it happend on both local machine and Team City build machine?

Great! @larsvancasteren. Have a good weekend!

I can try running directly on the host machine that’s acting as the build agent. So far i’ve been trying to run it from a TeamCity CLI command.

So running it manually in a terminal on the teamcity buildagent it does exit after the final report comes out, but Is there something i can do to make that happen in the teamcity cli command?

Hi @Frank_Keefer,

Thanks for your information. Please confirm these questions, that will help us investigate better:

  • If you run katalon directly from terminal without using TeamCity agent. It means you run the project on local machine like as a normal user, will the katalon process finish?
  • If you run katalon using TeamCity agent with a Test Suite that contains just one test case, will the katalon process finish?

Thanks.

It looks like updating the version of katalon helped with this issue. We upgraded katalon, and found that we had the -noExit flag still on in the Teamcity command. Once that was removed everything started working as expected.

2 Likes

Hi All,
I have encountered a similar issue, but unfortunately we don’t use the --noExit parameter in the command line.
We are able to launch simple test that only does an assert, but when we try to launch subcutaneous cucumber test on a remote web driver, the windows never seem to be closing and loop with this output
16:57:11 --------------------------------------------------------------------------------
16:57:11 Test Suites/SystemTestSuccess - Firefox - 20190821_135511…1/1(100%)
16:57:11 --------------------------------------------------------------------------------
16:57:26 --------------------------------------------------------------------------------
16:57:26 Test Suites/SystemTestSuccess - Firefox - 20190821_135511…1/1(100%)
16:57:26 --------------------------------------------------------------------------------

The only time the test completed was when it was unable to connect to the remote web driver or when I killed the geckodriver.

We use this command line:
/opt/katalonstudio/katalon -runMode=console -projectPath=/home/jenkins/project/qa-katalon-develop.prj -testSuitePath=‘Test Suites/SystemTestSuccess’ --executionProfile=‘TEST-Z’ -reportFolder=’/tmp’ -browserType=‘Firefox (headless)’

When we launch this test from katalon studio, the test completed correctly.
When I tried the consoleLog I had the following information that could provide usefull

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -runMode=console -projectPath=/home/jenkins/project/qa-katalon-develop.prj -testSuitePath=Test Suites/SystemTestSuccess --executionProfile=TEST-Z -reportFolder=/tmp -browserType=Firefox (headless)
Command-line arguments: -os linux -ws gtk -arch x86_64 -data config -runMode=console -consoleLog -projectPath=/home/jenkins/project//qa-katalon-develop.prj -testSuitePath=Test Suites/SystemTestSuccess --executionProfile=TEST-Z -reportFolder=/tmp -browserType=Firefox (headless)

We have katalon Studio Version 5.10.1, we run it in a Jenkins(V2.176.2) Pipeline that is launch on a dynamic agent provide with an OpenShift(v3.6) Pod.

Any help would be gladly accepted.

Hello All,

I’m facing a similar issue. My Test Suite runs on Linux machine through Command Line.
I don’t have -noExit parameter in the command. But, I still see that control doesn’t come out of Katalon even after Test Suite execution is completed and katalon process will still be alive.

If I kill the katalon process, control exits and return back to the calling method.
Also, this issue seems to be intermittent and more hung cases are seen than success.

Command Used:
$KATALON_HOME/katalon -noSplash -runMode=console -consoleLog -projectPath="/testuser/UI_Automation/katalon/tests-katalon.prj" -retry=0 -testSuitePath=“Test Suites/TestSuite” -executionProfile=“default” -browserType=“Chrome (headless)”

And I have proxy enabled (I have removed proxy info from command for security reasons).

Please lemme know if there is any workaround.

Hello,
Is the chrome browser installed on your Linux machine?

Please remove -consoleLog, or use the Katalon 7 Runtime Engine.

Yes! I have chrome installed. The hung happens in between the test case execution i.e chrome browser is launched with some test actions in progress.

Okay. Let me try. Thanks for the input.

But, do you know the root cause for this?? Is this a known issue??

The -consoleLog option is for running in interactive mode on Windows and should not be used on other platforms. This option has been removed in Katalon Runtime Engine 7.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.