Scheduling external batch jobs through Katalon


I am looking for solution to be able to schedule/trigger external batch jobs through Katalon test cases/suite. Is there a way this can be done using katalon?
The project we work for is Salesforce based and we need a solution to be able to trigger the external batch jobs that run as part of application flow while automating a test flow that needs some particular batch jobs to run as part of the flow.

Any help is highly appreciated. Thanks in advance.

Katalon uses the scripting language Groovy which overlays a Java subsystem. You can certainly execute OS tasks from Groovy/Java. However, if you want to synchronize those tasks with Test Cases, you will have a lot of work ahead of you.

But don’t take my word for it… let’s see what these guys think:

@Brandon_Hein @kazurayam @ThanhTo

I would recommend you to read Martin Fowler’s essay on Continuous Delivery:

I guess this is what you want to achieve.

a solution to be able to trigger the external batch jobs

It seems that you skipped (forgot) a question how you prepare an environment for those batch jobs. You need to create a directory tree, download external jar files, setup various configs, launch various processes such as “database” which the batch jobs depends upon. Only after you have set up the sufficient environment, you can trigger the job. Do you think you can manage such jobs (infrastructure construction) done by Katalon scripts? ---- I do not think it is feasible.

This requirement is addressed by the software called “Build tools” such is Gradle. KS is not designed for this type of role in mind. I would use Katalon Studio Runtime Environment as a role player just for UI testing purpose driven by a Gradle build.

If I require automatic scheduling/triggering a Gradle build, I would execute it under the control of Continuous Integration servers — such as Jenkins, TeamCity, Travis CI.

I would tell you again, KS is not a CI server.

1 Like

Yep. “What he said” :blush:

Just for your interest. Following post shows you how to execute arbitrary shell script from Katalo Test Case:

There will be cases in which you want to schedule your tests to execute within a period or every x hours. Katalon Studio does not support scheduler, but you can schedule executions using the steps below:

Create a batch/shell file (.bat / .sh) to execute your test suite using Console Mode Execution
Schedule your script as required in Task Scheduler (Windows) or cronjob (Linux / MacOSX )