How to develop Custom Keywords Plugins

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

Hello All,

I am facing unusual issue as below:
1- I have created Jars and put in plugin folder too.
2- But my test case is getting executed without importing this jars file.
note: I have removed all the keywords from current project folder.

1 Like

Please try closing and reopening the project.


Hi Thong :slight_smile:

May I ask when is the release for the support of Overloading Keywords? :slight_smile:

I second this a lot! We might switch to using Katalon for testing, but it is going to be painful going from a elegant gradle solution (with gradle wrappers), to having the user download a version of gradle. This will make it harder to keep gradle versions consistent across users…

Really cool, thanks a lot! :sunglasses: