Node.js: Server-side JavaScript remains active after Spy Mobile or a failed test

I started playing around with the Mobile part of Katalon today and quickly ran into a problem:
Every time i run a test or the SpyMobile, a Node.js process is created. Problem is, if i don’t use “Close Application” at the end of my test, the process remains active in Windows even after the end of the test. This means that if my test fails, the process remains as well. Same happens after using the Spy Mobile - the server process is created but not shut down.

This leads to memory blocking and also stops any further servers to properly run (processes are created but can’t complete the start up). Not a big deal to end the process manually in the task manager, but still… I ran out of memory very fast before noticing this since my test failed, i hit the Run button 5-6 times and it created 6 more servers that all use ~200mb of ram…

Is that just me or a general problem?

I think it’s a good suggestion, Dobromir. We’ve noted your problem down and definitely going to come up with an option for users to terminating Appium Server process when executing in the next Katalon Studio Release.

Again, we’re really appreciate your feedback. Cheers !

Thank you for the information Hieu!

I see what you mean about debugging an app after it has failed. Perhaps you could implement an option to select the behavior of the server in that case, to allow multiple tests to be executed automatically (a suite, suite collection)? On my system, if an Appium server process remains active Katalon will try to start new ones but they time out (might be just because my system doesn’t have enough resources) so basically if 1 test in a suite fails, the whole executing will break down.
Maybe a good solution is to keep the process running when executing single tests and automatically shut them down when executing a suite/collection? This seems logical to me, since if someone wants to test an app while working directly on it, he/she will be running single tests and not whole suites, and vice-versa if someone’s running a suite of many tests he/she would probably not be there to debug on the spot.

Hi Dobromir,

You’re right about the fact that the Node.js process, which is the Appium Server process by the way, is still running when your test failed. This is intended because if we close that process automatically when test scripts is failed, the test apps will be closed too and users will not be able to debug on those apps.

As for case when that process is still running when you stop the Mobile Object Spy, we’re aware of it and will have a fix for it soon in the future.

In the mean time, please spend some efforts to close those processes using Task Manager (on Windows) or Activity Monitor (on macOS)

Thanks a lot for using Katalon and giving us your feedback.