How to stop KRE execution (TS Collection) but allow to generate report after kill signal/timeout?

On our Pipeline, Katalon Runtime Engine execution timeouts sometimes. I would like to allow KRE to be SIGTERMed gently (or KRE should understand any other signal from kill -l list, or have parameter with whole job timeout), allowing it to end execution of Test Cases as it and generate report of what actually have been done, do other necessary steps at the end like upload to TestOps.

Is it possible somehow? I tested SIGINT and SIGTERM without success.

1 Like

not sure what do you mean by ‘KRE times-out’ but the actual issue seems to be with your testcases.
you should carefully inspect where it got stuck and handle that from the code you run.

that is the first problem to solve, doing a kill switch is also doable by why would you need that? kill -9 usually solves everything

Hi, thanks for feedback.

Example. I have pipeline (on any CI/CD) with usage of official docker image with KRE. I execute test suite collection in that container.
Next, I get normal run of test cases, but sometimes I have a situation when execution blocks on random test case but I won’t get report as it would run infinitely, and be killed by 2h timeout (SIGABRT/aka kill -9)

not sure what do you mean by ‘KRE times-out’

You are right. I haven’t definied it. I have 2h (time boundary) for KRE execution to end. Not always, but sometimes KRE box slow down much and stop on one testcase.
To debug it, I would like to have Reports from machine even I need to stop (but gently) test suite (collection) execution. I do not care what is the progress, if it last more than 2h I need to stop execution and generate report. This is main point, I just want to have partial report for TestOps just in case whole run is not possible in specified timeframe.

Now, when I “kill switch” with -9 or -15 it works like -9, just stops execution, no report is generated or send to TestOps from what test cases executed already. -9 abort execution eventually. Other signals could be used by administrator to stop process gently, allowing it for example, to commit transaction, end processing in threads, not be killed and forgotten as with Abort signal.
I wonder if timeout of test suite/collection run (when it would do “final” steps like report generation and upload) could be feature for future, or if I could make my KRE to generate report before being killed.

Well, as far as I know, in the actual form KRE does not have such implemented.
But your request is leggit, I would like to see such “gracefull shutdown” implemented.
How to determine the timeout will be another storry.
The only thing you can do for now is to rise a feature-request on this matter.
If, when and how may be implemented … not even god knows.