Katalon is slow to execute tests cases on MAC

Hello,

On my MAC (Apple m2 8Go ram Sonoma 14.0) if i run a simple test case, it take 1 minutes
The same test on my pc (windows 10,12 Go ram) take 18 seconds

I followed this topic but nothing changed:

if I run the same 4 tests in parallel on my pc and mac:

time mac 4 tests:
Elapsed time: 5m - 59.422s
pc time 4 tests:
Elapsed time: 1m - 40.264s

i have the same katalon version : 8.6.8 and i run the tests cases on chrome (up to date)

Thanks for your feedback.

2 Likes

so, use windows. mac is crap

1 Like

Speed depends on how many parallel test are running, also configuration of system,
as said @anon46315158 windows is faster than Mac.
But we can improve speed to follow some below tips!

  1. disable smartwait
  2. Always use softwait
  3. disable selfhealing
  4. uncheck screenrecording etc
2 Likes

Hello,

I have no choice, the Mac is there to run the tests autonomously, my PC is there for other tasks.

Hello,

So it’s known that MAC mishandles Katalon Studio?

I will try your solutions,

Thank you for your comeback.

1 Like

On my Mac, Katalon is not slow so much. :wink:
I guess, you have some reason unique to you.

Could you share the source code of your simple test case and the log?
Could you check the log and which statement of your test case takes long time to run?

I was trolling :slight_smile:
In addition to the advices received you can also try to tune a bit the heapsize settings In Katalon ini file.
Take a look also at this topic and try the proposed workarounds (e.g turn off log viewer):

Hello, yes of course! :slight_smile:

I’ve seen 3 steps that take abnormally too long:
-openbrowser
-navigatetourl
the first verifyelementtext

I think that with the Mac, triggering the test, opening and browsing the website is what takes the longest, I don’t explain it because at the same time I launch the same test on my PC which executes very quickly.

I followed the tutorial to remove the “log viewer” and it didn’t change anything”

There is my code and log attached

try {
    WebUI.openBrowser('')

    WebUI.maximizeWindow()

    WebUI.navigateToUrl('https://******************/')

    WebUI.setText(findTestObject('Object Repository/Page_Connexion comptes Google/input_**********_identifier'), 'a.bluteau@******************')

    WebUI.click(findTestObject('Object Repository/Page_Connexion comptes Google/div_concat(Conditions d, , utilisation)_VfP_af5f73'))

    WebUI.setEncryptedText(findTestObject('Object Repository/Page_Connexion comptes Google/input_Trop de tentatives infructueuses_password'), 
        '********************************')

    WebUI.click(findTestObject('Object Repository/Page_Connexion comptes Google/div_concat(Conditions d, , utilisation)_VfP_af5f73_1'))

    WebUI.verifyElementText(findTestObject('login_page/home_page_text'), 'Donnez de l’élan Ă  vos projets professionnels ou entrepreneuriaux')

    WebUI.verifyElementText(findTestObject('login_page/home_page_text_2'), '******* vous accompagne tout au long de votre parcours professionnel ou entrepreneurial en mettant à votre disposition ce qui sera la clef de votre réussite, du réseau et de la compétence.')

    WebUI.verifyElementVisible(findTestObject('login_page/FF_logo'), FailureHandling.STOP_ON_FAILURE)

    WebUI.verifyElementVisible(findTestObject('login_page/candidacy_link'), FailureHandling.STOP_ON_FAILURE)
}
catch (Exception e) {
    KeywordUtil.markFailed('Test Case échoué: ' + e.getMessage())

    WebUI.takeScreenshot('screenshots/Login_Page/Present_elements')
} 
finally { 
    WebUI.closeBrowser()
}


Which browser type do you use? Chrome, Firefox, Safari, Edge?

What is the version of the browser and the webdriver?

If you find a browser type (e.g, Chrome) is slow, then try to other type like Firefox. How does it work?


I don’t think your problem is due to OS type (Windows/Mac). On my Mac, Katalon works fine.

You are using 2 different machines. Therefore there could be many factors which are different between the 2 machines other than OS type.

Browser version, WebDriver version, virus checker, etc.

And how is the local network configured for the 2 machines? Do you have any Proxy server?

Are you using the Smart Wait ON?

If yes, try toggling the Smart Wait OFF, and try running your test. Things may change – some error might occur, which could tell something about the cause of your problem.

I looked at the image

To me, it seems that your Application Under Test (web server) is responding slowly.

If you disagree, then please show other evidences that proves Katalon runs slow on Mac.

sorry for the time, I am grouping my feedback here:

I use Chrome base, on my PC and Mac.

both are up to date and the webdrives too (118.0.5993.89)

the local network is the same: the 2 machines are on wifi and next to each other, the network is very good.

I had disabled smartwait, but I had to add the “waitforelement” otherwise my test failed. so I reactivated the smartwait.

the website that I am testing is online and does not lag, no proxy and by launching the same test at the same time I have a very different duration as I showed you in my screenshots.

so I tried with Firefox on the Mac and surprisingly, the test took 10 seconds. I restart it on Chrome, it takes 23 seconds (I modified the test so that it takes less basic time) On my PC it takes 9 seconds.

So the problem is between chrome and katalon studio.

When I run the test, I can see that it lags, that the actions are slow (click on a button or a field or enter text) etc.

If I go to the website without going through a test case, I don’t experience these slownesses.

However, Chrome is up to date on the Mac:
118.0.5993.96
the webdriver on katalon:
118.0.5993.70

It’s exactly the same version as on my PC.

If you have other ideas


prior to move forward, kindly run some speedtests from both of your machines and show to us the end results
run such multiple times on each machine and do an average. a single run is not relevant

why do you make the assumption that two machines different in hardware and os installed have the same networking performances? particularily with wifi.
just because they seat next to each-other?

Also, make sure you are closing any application you don’t need on both PC and Mac prior to benchmark it (with speedtest or with katalon)
At least for Mac I noticed most of the users keeps plenty apps running, because of the dock. If they don’t “see” it they assume is not running (my wife usually complains about ‘whyyy my maaaac is soooo slooow’ and most of the time I find tones of apps running)
To solve it, because I simply cannot change her behaviour, I had to buy mor RAM (luckily her Mac desktop support this upgrade)

Slow test execution on Katalon with a MAC could be due to various factors, such as system resources, network, or inefficient test design. Consider optimizing your test scripts and ensuring your MAC has adequate resources for faster execution.

In the screenshot you shared, I found the following statement took exceptionally long time:

Over 6 seconds. Why this statement took this long? — This is the very question you should ask.


I am particularly interested in this point.

With statements WebUI.waitForElement(TestObject) cured your test? How is your test slow/fast with waitForElement?

You wrote you don’t like to insert WebUI.waitForElement(TestObject) statements. Why? If waitForElement cures your test and make it run fast enough, I think you should take that approach. Why don’t you do it?

Without “Smart Wait”, do you experience a failure both on Windows and Mac? or only on Mac?

Without “Smart Wait”, do you encounter a failure on Chrome only? How about Firefox?

If you could tell how the “Smart Wait” in various conditions, the observation would tell us some clue, I think.

What is the Smart Wait at all?

As @Russ_Thomas told us at The World Wide Wait - #2 by Russ_Thomas, you can find a JavaScript source /Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/extensions/Chrome/Smart Wait/content/wait.js. Please have a look at it. This is the implementation of “Smart Wait”. It listens to various kinds of DOM Modification Events and wait for the stream of the events to cease. In other words, the scripts waits for the web page to be still, static, not changing any more.

@a.bluteau

I guess that your AUT (Application Under Test, the target web page) is heavily driven by JavaScript. It would not be a dum simple HTML. JavaScript-driven web pages are difficult for Katalon Studio to work with. Katalon Studio’s findElement(TestObject) function originally does work work with web pages driven by JavaScript. findElement(TestObject) function with SmartWait disabled does not communicate with the JavaScript in the web page at all. Therefore you experienced test failure without “Smart Wait”.

When the “Smart Wait” = wait.js is enabled, the findElement(TestObject) function changes its internal behaviro drastically but silently behind the scene. The function starts communicating with the JavaScript in the web page to wait for the AJAX-driven events to cease.

Something complicated is going in JavaScript layer on behind the scene. That could affect Katalon Studio’s behavior. I am afraid, it is very difficult for Katalon Studio to control.

Is it on Windows or on Mac?

This test took 17 seconds. Do you still think 17 seconds is too slow?

I think a test run in 17 seconds is acceptable.

I think that is Win, looking at the originating post, the Mac is the one with black theming which shows ~ 50s. which is meh.

@a.bluteau

How about cleanly deleting Chrome, and reinstalling it on Mac?

Things may change.

this is 100% accurate
 just few days ago I submitted a ticket cuz the tests on my macs are so sluggish. i also have 8GB ram
 which isn’t optimal
but shouldn’t really be the reason why.
Katalon takes up half of the RAM
 then you can imagine the chrome instances eats up some memory too. However, CPU is barely used. But it’s still no excuse for test executions to be this sluggish.
check your MEMORY and CPU
image