Is it possible to search in Katalon as in Eclipse?

Eclipse: image
Katalon: ?

If it’s possible, then HOW? If it’s not possible, then WHY?

Thanks!

No, it is not possible. Not supported.

I don’t know. Ask Katalon Team.

I personally never feel I need it.

I would rather ask you why you need it?


A Katalon Studio project is a folder with a composite of Groovy source codes (*.groovy) + XML files + *.properties files. All of them are text files. You can open a Katalon Studio project folder with your favourite Editor and do “Text Search” and “Text Replace” as much as you like. When necessary, I would do so using Emacs or Visual Studio Code. Be sure you don’t break the Katalon’s project structure when you do so.

For your information.

When I open a Groovy source file in the Keyword folder, I can right click a method name of a class, select Reference > Project; then Eclipse Search feature shows the references made by other Groovy source codes in the project.

As you can see, the Eclipse Search feature is in action behind Katalon Studio.

But I do not find a “Search” feature for Test Cases. Though I would not need it.

Hi kazurayam,

  1. It would be great to have it for the same reason Eclipse has it - to make developers lives easier and more productive. For example, if you remember some function name or a part of it, but don’t remember the locations where it’s defined or used, that would definitely help. Or you need to work on the project developed by someone else and trying to understand it. Etc., etc, etc. Katalon is not very helpful in this regards to put it mildly. Yes, it’s possible to use some editors to search, but that’s not the same as being able to do it in Katalon itself and then just click on the search result to get to the exact location in Katalon itself (w/o even being able to “break the Katalon’s project structure when you do so.”)) and being able to edit it right away.

  2. As for your second reply, even that shows how unfriendly Katalon is to their users because it looks like, for example, in my Util.groovy

    @Keyword
	def static clickElementJS(TestObject to) {
		//  STATIC usable and searchable in the Keywords by selecting 'clickElementJS' when called like this
		//	 (i.e. w/o CustomKeywords.'web.Util.clickElementJS') :
		//  "web.Util.clickElementJS(findTestObject(''))"
		//
		// 	searchable in the Scripts, Tests by using Util.groovy (Show References) when called like this
		//	(i.e. with CustomKeywords.'web.Util.clickElementJS') :
		//  CustomKeywords.'web.Util.clickElementJS'(findTestObject(''))
		//
		//   not searchable in the Scripts, Tests when called like this:
		// 	//	 (i.e. w/o CustomKeywords.'web.Util.clickElementJS') :
		//	 web.Util.clickElementJS(findTestObject(''))
  1. The other example of Katalon’s unfriendliness is that you cannot get to the step that produced an error by just clicking on some link, which is a standard feature of many IDEs.

kazurayam, I just put my observations about searching in my code and commented it out. In my previous comment, I just copied it directly from my code to give some context helping to understand what my comments are about. Still it looks better after you use the Markdown code formatting. Thanks.

Which reminds me about another Katalon’s “feature”. If I right-click -> Source -> Add Block Comment, it distorts my code. right-click -> Source -> Toggle Comment works though. That’s all my comments are now //

The funny thing is that, as a result of my observations about searching, I’m only using something like this to use my keywords in my tests

CustomKeywords.‘web.Util.clickElementJS’(findTestObject(’’))

just because it’s easier to search and not for any other reasons )

Are you aware that you don’t have to call your Keyword classes indirectly via CustomeKeywords?

Your test case and your groovy classes can call your Keyword class.method() directly just as a usual Groovy class.method() like this:

import web.Util

Util.clickElementJS(findTestObject('...'))

If you write your code in this simpler way, the Eclipse built-in “Reference > Project” feature in the Script mode editor will work for you.

If you write your code in CustomKeywords."..."(...) format, unfortunately, the “Reference” feature loses its power.

CustomKeywords is a magic spell that functions only in the Manual mode of Test Case editor. If you do not use the Manual mode and use the Script mode only, you can forget CustomKeywords and @Keyword annotation at all.

1 Like