How to disable editor script to auto formatting

staff-19

#1

Hii there,
Mostly i do scripting in Katalon, and I feel auto formatting source code in script mode is not convenient, sometimes it automatically add new line at keyword call, the println “something” became println(“something”), i prefer less parentheses (groovy goodness), and sometimes i got my method parameters argument is empty, this unexpected behavior makes my script very fragile
Is there any way in Katalon preference to disable auto formatting in script like this?
I’m hardy find the setting by myself :frowning:


#2

Fachrul Choliluddin said:

Hii there,
Mostly i do scripting in Katalon, and I feel auto formatting source code in script mode is not convenient, sometimes it automatically add new line at keyword call, the println “something” became println(“something”), i prefer less parentheses (groovy goodness), and sometimes i got my method parameters argument is empty, this unexpected behavior makes my script very fragile
Is there any way in Katalon preference to disable auto formatting in script like this?
I’m hardy find the setting by myself :frowning:

Hey Fachrul,

Thank you for using Katalon Studio. Unfortunately, Katalon Studio doesn’t have disable auto-formatting yet. I have logged this suggestion for further discussion. In the meantime, please delete the parentheses manually.

Thanks again,
Liam


#3

thank you for your response liam,
I wanna show you the problem here


so when i move from scripting mode to manual input, some of my code changet (auto format) like println “string” become println(“string”) and all my own method’s argument (logger.saveNewCredential in above image) disappear!
what i want to achieve is to prevent katalon auto change script formatting


#4

Fachrul Choliluddin said:

thank you for your response liam,
I wanna show you the problem here


so when i move from scripting mode to manual input, some of my code changet (auto format) like println “string” become println(“string”) and all my own method’s argument (logger.saveNewCredential in above image) disappear!
what i want to achieve is to prevent katalon auto change script formatting

Hi Fachrul,

Would you mind provide some sample scripts of your project? Katalon team would like to further investigate this issue.

Regards,
Liam


#5

Oke… here is the code https://gitlab.com/fachrul/sampleKatalon


#6

Fachrul Choliluddin said:

Oke… here is the code https://gitlab.com/fachrul/sampleKatalon

Thank you for providing the sample project. Katalon team is in the process of testing your project. We notice immediately notice your problem after a quick look. I have logged a ticket and it will be further discussed.

Thanks again,
Liam


#7

Is there an update on this, it’s very annoying.


#8

Bumping this since there seems to be no progress on it for 10 months now.


#9

Has this come any further? I am noticing this problem in my dynamic selector id test script. I created a class that looks like this:

public class MySelectors {
public static final String dynamicIdPath = ‘//*[@id="%s"]’
}
And randomly it will delete this test class definition.


#10

Any update for this? It is really annoying, basically it makes me commit every single change to git, bcs I cant be sure if my script will stay the same, or Katalon will just decide to fck it up…

I think we are not asking you to fix the auto formatting feature. We are asking for an option to turn it off


#11

BUMP

I would also like to be able to turn off the automatic formatting. Every time I save it messes with my parens, whitespace, comments, etc. which cripples my ability to collaborate with other testers on a script, especially when they’re in another timezone. Any update on this? As it stands I have to use Notepad ++ to do my editing and paste into Katalon to test my changes. This doesn’t help anybody that gets my tests out of version control somewhere else, though. To clarify, I’m not asking for an improved automatic formatting, just a way to turn it off. Thank you!


#12

Any update for this ?


#13

True, this is a dumb-ass feature, and should be trivially easy to disable.
Why is it not done yet?


#14

I’ve only been using this software for a couple a weeks, and the plans are to smoke test the client side APIs. A “feature” like this seriously needs to have the option to be disabled. It’s already broken a few of my scripts when I decided to add to a new call to a test case.