# How to develop Custom Keywords Plugins

**URL:** <https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321>\
**Category:** Integrations\
**Tags:** plugins, katalon-studio\
**Created:** [March 1, 2019, 10:40am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321 "2019-03-01T10:40:54Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 11, 2019, 6:36am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/21 "2019-03-11T06:36:11Z")

</div>

> [@Thong](#):
>
> Currently, we don’t support overloading custom keyword functions. We will release an enhanced version soon. Thanks.

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

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 11, 2019, 6:38am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/22 "2019-03-11T06:38:07Z")

</div>

> [@devalex88](#):
>
> we don’t support overloading custom keyword functions.

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

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 12, 2019, 9:35pm UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/24 "2019-03-12T21:35:27Z")

</div>

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

> [@How to generate Groovydoc of Plugin](http://forum.katalon.com/t/how-to-generate-groovydoc-of-plugin/21028):
>
> I am preparing [junit4ks](https://github.com/kazurayam/junit4ks) as a Katalon plugin. I wanted to publish the API doc of junit4ks generated by Groovydoc. Here is [the link to it](https://kazurayam.github.io/junit4ks/api/index.html) on GitHub. I needed to change my junit4ks/build.gradle to generate the groovydoc. Here I would show it. plugins { id 'java' id 'groovy' id 'com.github.johnrengelman.shadow' version '4.0.4' id "com.katalon.gradle-plugin" version "0.0.6" } ext { groovyVersion = '2.4.7' } configurations { generateDocs } repositories { jcenter() …

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 13, 2019, 4:23am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/25 "2019-03-13T04:23:02Z")

</div>

I applied the presented build.gradle file to my [junit4ks](https://github.com/kazurayam/junit4ks) project and successfully created the jar as follows:

```auto
$ 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

```auto
-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

```auto
group="com.kazurayam"
version="0.16.0"

```

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](https://github.com/kazurayam/junit4ks/releases) page. Now anybody can download the jar.

I downloaded `junit4ks-all.jar` into the `Drivers` directory of my another Katalon project [webdriverfactory4ks](https://github.com/kazurayam/webdriverfactory4ks/tree/master/Drivers). I mean, I would use the Keyword classes contained in the `junit4ks-all.jar` just as one of the [External libraries](https://docs.katalon.com/katalon-studio/docs/external-libraries.html) 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.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 15, 2019, 11:54am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/26 "2019-03-15T11:54:10Z")

</div>

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

> [@Katalon Studio 6.1.0 Beta](http://forum.katalon.com/t/katalon-studio-6-1-beta/21183):
>
> This is an announcement for Katalon Studio 6.1.0 Beta. The current stable release is Katalon Studio 6.0.6. Download: [https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon+Studio.dmg](https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon+Studio.dmg)[https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon\_Studio\_Linux\_64.tar.gz](https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon_Studio_Linux_64.tar.gz)[https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon\_Studio\_Windows\_32.zip](https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon_Studio_Windows_32.zip)[https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon\_Studio\_Windows\_64.zip](https://s3.amazonaws.com/katalon/beta-release/6.1/Katalon_Studio_Windows_64.zip) Changes: Fixed an issue where project having many GlobalVariables …

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 23, 2019, 6:45am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/27 "2019-03-23T06:45:10Z")

</div>

@devalex88,

> [@Thong](#):
>
> Run the following command, then checking the `build/libs` for the plugin’s JAR package.
> 
> ```auto
> gradle katalonPluginPackage
> 
> ```

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.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 23, 2019, 7:03am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/28 "2019-03-23T07:03:18Z")

</div>

@devalex88,

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

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

```

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

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 23, 2019, 7:21am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/29 "2019-03-23T07:21:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mytruong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mytruong/32/23869_2.png) [@mytruong](https://forum.katalon.com/u/mytruong)\
**Post date:** [April 12, 2019, 8:51am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/30 "2019-04-12T08:51:13Z")

</div>

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.

![image](https://europe1.discourse-cdn.com/katalon/optimized/2X/5/5dcabe9500d4e516affb3865c198f2cfff514165_2_690x55.png)

[katalon-studio-ashot-plugin.zip](https://europe1.discourse-cdn.com/katalon/original/2X/a/a9191a7b30728f7dbb93081b6208cbe57e4bc1a3.zip) (27.0 KB)

Could you please take a look on the issue.

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [April 19, 2019, 3:37am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/32 "2019-04-19T03:37:26Z")

</div>

Hi @mytruong,

Please download Katalon Studio v6.1.2 release: [https://github.com/katalon-studio/katalon-studio/releases](https://github.com/katalon-studio/katalon-studio/releases) and open a project with embedded the `katalon-studio-ashot-plugin.jar`, you will see the original error on Event Log tab:

```java
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(Java5.java:421)
	at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:357)
	at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:479)
	at com.kms.katalon.custom.parser.CustomKeywordParser.parsePluginKeywords(CustomKeywordParser.java:130)
	at com.kms.katalon.controller.KeywordController.parseCustomKeywordInPluginDirectory(KeywordController.java:187)
	at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(KeywordController.java:137)
	at com.kms.katalon.controller.ProjectController.openProjectForUI(ProjectController.java:95)
	at com.kms.katalon.composer.project.handlers.OpenProjectHandler$1.run(OpenProjectHandler.java:152)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

```

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](http://forum.katalon.com/t/how-to-resolve-external-dependencies-for-a-plugin/21346)

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [May 14, 2019, 11:08pm UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/33 "2019-05-14T23:08:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![prabhat.pk589](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@prabhat.pk589](https://forum.katalon.com/u/prabhat.pk589)\
**Post date:** [May 21, 2019, 11:07am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/34 "2019-05-21T11:07:59Z")

</div>

Hello All,

I am facing unusual issue as below:  
steps:  
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.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [May 21, 2019, 5:01pm UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/35 "2019-05-21T17:01:13Z")

</div>

Please try closing and reopening the project.

---

<div class="post-metadata">

**Author:** ![Garena](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/garena/32/16103_2.png) [@Garena](https://forum.katalon.com/u/Garena)\
**Post date:** [July 24, 2019, 7:46am UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/36 "2019-07-24T07:46:37Z")

</div>

Hi Thong 🙂

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

---

<div class="post-metadata">

**Author:** ![nathaniel.s.thompson](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@nathaniel.s.thompson](https://forum.katalon.com/u/nathaniel.s.thompson)\
**Post date:** [March 4, 2020, 9:30pm UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/37 "2020-03-04T21:30:35Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ejacquemoud](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ejacquemoud/32/22091_2.png) [@ejacquemoud](https://forum.katalon.com/u/ejacquemoud)\
**Post date:** [November 17, 2021, 2:25pm UTC](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321/38 "2021-11-17T14:25:11Z")

</div>

Really cool, thanks a lot! 🕶

[Previous page](https://forum.katalon.com/t/how-to-develop-custom-keywords-plugins/20321.md?page=1)
