Katalon Studio’s document includes the following:
In some cases this would work.
I personally do not use this approach, because their approach works only if the Keyword has no dependencies to any external libraries which is not bundled in Katalon Studio. I quite often use external libraries which are NOT bundled in Katalon Studio — in fact this is the reason why I create my Keywords.
I do the following approach, namely “distribute classes in Jar via Maven repository”
- in the Project A, make a jar file which contains the class files of your Keyword
- push the jar file into a Maven repository (either public one or private one)
- in the Project B, download the jar file from the Maven repository into the Drivers folder of the Project B
There could be a lot of variations how to implement this. How to build the jar? — I use Gradle but you can build it by Maven, Ant etc. Which Maven Repository to host the jar? — the mavenLocal repos on PC, organizational private Maven repository, a Maven repository on GitHub, the Maven Central repository. How to download the jar? — I use Gradle.
Why do I use Maven repository? — I use it in order to resolve External Dependencies required by my custom classes. Resolving external dependencies via Maven Repository is the standard way how all Java programmers in Open-Sourced-Software world share their artifacts. Katalon Studio does not support this. I had a hard time to find out how to use Gradle + Maven Repository for Katalon project. It would not be a practical option for you. So I would not talk about it for now.