How to develop Custom Keywords Plugins

Yes, Custom Keyword plugins will be shared in Katalon Store - we are working on this function.

And thank you for sharing your JUnit Custom Keywords :smiley:.

1 Like

I do not like this portion.

Gradle has a standard task named install. By executing > gradle install, one can publish the associated artifacts (pom and jar) to the local Maven cache. And I would prefer copying the junit4ks.jar from the local Maven cache into my new Katalon project’s Plugin folder by some command like > gradle dependencies or > gradle katalon-dependencies.

More questions.

It is not enough if I publish a custom keywords in jar without associated materials such as

  • sample test case script
  • document
  • associated Test Listener code, Test Objects, and much more

How can I publish those materials with junit4ks.jar?

I got an issue when I open katalon project including file .jar in the folder Plugins. I’ve followed steps as guideline to build file .jar and test a custom keyword plugin but fail to do another one. The error message is:
katalon-plugin-issue (89.0 KB)

Could you please help me on this. Thanks

Hi @mytruong,

Currently, we don’t support overloading custom keyword functions. We will release an enhanced version soon. Thanks.

Thank you @kazurayam for your feedback.

There will be a field for each plugin to specify their Github repositories. Companion materials can be provided their. @YoungNgo has updated the original post to include guidelines for publishing.

Test Listeners, Test Objects, etc. will be handled soon in the next version.

Let try to change the declare data type of method: def instead of List<{dataType}>
For example at line 91 in WebTableHelper class: private static List getSelectedOptions(List selects)
Please change it to: private static def getSelectedOptions(List selects)

I made junit4ks-all.jar.

I created a brand new project using Katalon Studio 6.0.6. I. I created Plugins directory in the root directory of the project. I copied the junit4ks-all.jar into the Plugins diretory. I reopened the project, and then I got the “Unable to open project” error dialog as follows:

I attached the junit4ks-all.jar (renamed to be *.zip because this forum site rejected *.jar file to be attached) (37 KB)

Please help fixing this error.

I want to generate the Javadoc/Groovydoc of junit4ks-all.jar and publish it in the Katalon Store, as I can pushlish the javadoc under the /docs directory of my Github project. Please extend the build.gradle to support generating and publishing the Groovydoc of custom keywords.

It works. Thanks a lot

1 Like

Would this apply to your case @kazurayam? We are working on it. A new beta version will be available this week.

I do not understand what Thong means.
Anyway, I would wait for the new version hoping no ArrayIndexOutOfBound expection to be raised.

I posted my amended build.gradle which is capable of generating the Groovy Doc of plugin.

1 Like

I applied the presented build.gradle file to my junit4ks project and successfully created the jar as follows:

$ ls -la build/libs
total 80
drwxr-xr-x 1 qcq0264 1049089     0 Mar 11 10:08 ./
drwxr-xr-x 1 qcq0264 1049089     0 Mar 13 13:00 ../
-rw-r--r-- 1 qcq0264 1049089 37888 Mar 11 09:45 junit4ks-all.jar

However, I would rather like to make the name of jar appeded with the version number, like

-rw-r--r-- 1 qcq0264 1049089 37888 Mar 11 09:45 junit4ks-all-0.16.0.jar

I would gladly write the version number in the build.gradle like


Writing the version number in build.gradle is a quite common exercise in Gradle I believe.

Adding the version number in the jar name requires modifying the katalonPluginPackage task, I believe. Please consider it.

I created junit4ks-all.jar and posted it in my Github project’s Releases page. Now anybody can download the jar.

I downloaded junit4ks-all.jar into the Drivers directory of my another Katalon project webdriverfactory4ks. I mean, I would use the Keyword classes contained in the junit4ks-all.jar just as one of the External libraries for Katalon Studio. I used junit4ks keywords to do unit-test my Groovy classes in the webdriverfactory4ks project using JUnit4. It just worked successfully.

This means, I could make my Custom Keywords packaged into a jar, publish it via Github, reuse it in another Katalon projects successfully.

1 Like

@kazurayam @mytruong We’ve fixed this issue in version 6.1.0 beta:


If one does not have gradle installed on their machine, this command execution will fail. What he/she should do?

Me? I happened to have the gradle installed on my machine. But Katalon should not expect everybody has gradle installed.

1 Like


The most straight-forward solution would be let new version of Katalon Studio to bundle Gradle Wrapper in it so that all Katalon Studio users can execute

$ cd <katalo project dir>
$ ./gradlew katalonPluginPackage

This would enable us to use Gradle quite extensively in Katalon Studio.


Thank you for the idea. We will work on it in future releases.

I get an issue when using katalon 6.1 Beta for testing custom keyword plugin. I create a katalon project and put file .jar into the Plugins folder and reload it. Some toolbar entries such Run, Debug disappear, and I try to use Action → Run but there are somethings wrong with the file .jar. Custom keywords of the plugin seemly are not loaded successfully. (27.0 KB)

Could you please take a look on the issue.


Hi @mytruong,

Please download Katalon Studio v6.1.2 release: and open a project with embedded the katalon-studio-ashot-plugin.jar, you will see the original error on Event Log tab:

Caused by: java.lang.NoClassDefFoundError: Unable to load class kms.turing.katalon.plugins.visualtesting.ScreenCapture due to missing dependency ru/yandex/qatools/ashot/Screenshot
	at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(
	at org.codehaus.groovy.ast.ClassNode.lazyClassInit(
	at org.codehaus.groovy.ast.ClassNode.getMethods(
	at com.kms.katalon.custom.parser.CustomKeywordParser.parsePluginKeywords(
	at com.kms.katalon.controller.KeywordController.parseCustomKeywordInPluginDirectory(
	at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(
	at com.kms.katalon.controller.ProjectController.openProjectForUI(
	at com.kms.katalon.composer.project.handlers.OpenProjectHandler$
	at org.eclipse.jface.operation.ModalContext$

To resolve this error, your custom keyword plugin needs to package along with the ashot.jar. Please read this article for more details: How to resolve external dependencies for a Plugin