Which is the better approach? Calling test cases multiple times or calling custom keywords intead?

Another aspect.

It is easier to develop & test Test Case scripts in Katalon Studio. You can run a Test Case by single button click, Katalon Studio emits verbose execution log, you can interactively see how your Test Case ran.

On the other hand, it is difficult to develop quaility Groovy classes as custom Keywords in Katalon Studio. Katalon Studio does not offer any built-in support of unit-testing of custom Keywords.

I once developed junit4ks to perform unit-test over my custom classes.

Often I develop custom classes to use in a Katalon project OUTSIDE Katalon Studio. I use IntelliJ + Gradle where I carry out enough unit-testing using JUnit4. Once developed, I will create a jar, import the jar into the Katalon project, use the classes in the jar from Test Cases.

A practical suggestion from me for easier path could be:

  1. use a composite of multiple Test Cases, rather than Keyword classes
  2. try to minimize the verbosity of step-execution logs emitted by Katalon Studio. See the above-mentioned post how to.
1 Like