Logging the steps of a custom keyword method

There could be 2 types of modules in Katalon project:

  • one type is dependent on Katalon Studio’s API like WebUI.openBrowser(),
  • another type is independent on Katalon Studio’s API.

When I write my test codes I always try to distinguish these 2 types.

I would try to implement the first type of module (Katalon API dependent) as Test Cases to be called by WebUI.callTestCase(), not as Keywords. I can not develop this type of module outside Katalon Studio, as the Katalon API is not distributed as importable jar files outside the Katalon Studio product.

I would implement the second type of modules(Katalon-independent one) as Groovy/Java classes OUTSIDE Katalon Studio. I prefer IntelliJ IDEA, as IDEA is far easier than Katalon Studio to develop Groovy/Java classes. I will code, test, and build a jar file which I will import into the Drivers folder of a Katalon project. An example is here.


However, sometimes, I need to develop 3rd type of module in a Katalon Studio project. That is, a Custom Keyword that depends on Katalon Studio’s API. In order to perform unit-tests for the 3rd type Custom Keywords inside Katalon Studio, I invented a way using JUnit in KS.