How to create jar libraries from Custom Keywords?


#1

I have developed some Custom Keywords for various Katalon Studio projects in our company. Up to now I synchronized the contents of the last edited project’s Keywords directory manually to the Keywords directories of all other projects. However, this process is becoming increasingly confusing and error-prone.

In addition, we will continue to work on the projects in distributed teams in the future, whereby I will take care of the further maintenance of the Custom Keywords as well as the initial creation of new Test Suites. On the other hand, the product managers and developers of the applications to be tested should be able to edit the Test Suites (and especially the included Test Cases) independently in the event of necessary adjustments and, if necessary, also jump back to earlier versions of my Custom Keywords basis.

Therefore I would like to maintain and version my Custom Keywords a little more professionally as a general code base for all projects. But as far as I understand the interaction between Katalon Studio and Git so far, the testing projects can only be versioned as a complete package, right?

So I guess the best way to achieve my goal would be to pack my Custom Keywords into jar libraries that could then be included in any other Katalon Studio projects. Unfortunately, I have no experience with Java projects in general or with Maven in particular - is this where Maven comes in? Or is there another “best case” to implement this? And what exactly would I have to do?

Many thanks in advance for any hints!


#2

… And we all sit back and wait for Kazurayum to respond :smiley:


#3

@Russ McTyre

To be honest, I was hoping a little bit that you might also know something about this? :slight_smile: So my question is also of interest to you?


#4

Your question? No… I have no interest in that at all – but Kaz’s answer, on the other hand…

(Sorry, couldn’t resist) :B

Oh, and who is Russ McTyre? :smiley:


#5

Oh, and who is Russ McTyre? D

Sorry, that was taken over by the forum software, after I had accepted the suggestion for “Russ Thomas” while typing “@Russ”. Strange. Unfortunately, I can’t fix this mistake any more, because when I try to edit the post, I only get to my starting post of this thread. - Obviously, another bug, but I’ve noticed it several times before.


#6

For those who are also interested in an answer to my question: kazurayam has now replied to me in another thread: https://forum.katalon.com/discussion/comment/19610#Comment_19610


#7

Drunda,

I think the “Import/Export Keyword” which was added in Katalon Studio 5.5 is for you

see


for my comments


#8

Hi All,
I am also have similar situation. We want the keywords to be available to each team so that they can use it. However,
I don’t see an option to export my keyword as a jar (i don’t see import export functionality) in katalon 5.7 . Has it been removed ?


#9

Hi Sriharsha,

I don’t see an option to export my keyword as a jar (i don’t see import export functionality) in katalon 5.7 . Has it been removed ?

So far there is no special Git export function for Custom Keywords, right.

But there is a Git import function, try a right click on the Keywords item in the Project Explorer. :slight_smile:

However, this feature is not particularly well thought out. See the bug report of kazurayam and my workaround and improvement suggestions in this discussion, where you can also vote for it.

Edit:

Sorry, I overlooked that you were still interested in exporting your Custom Keywords as jar libraries. This is actually not (yet) possible out-of-the-box.

I myself didn’t follow this approach any further, because we now have separated repositories for all our Custom Keywords that can be used across projects, which we manage with an external Git client (Sourcetree) and the help of symlinks due to the restrictions in Katalon Studio. If you are interested in this setup, I can tell you more about it in another post.


#10

Some (most of sane) customers/clients/companies usually consider that sharing/uploading binaries (e.g jar’s) into the VCS it is bad practice, and should be discouraged.

Therefore, for custom keywords, I will opt for sharing them as code (and training the team how to properly use Git or whatever VCS is in use)


#11

See


for a new solution. You can create a jar which contains your custom keyword classes, build process is implemented using Gradle.