How to disable editor script to auto formatting

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

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

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

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

5 Likes

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

3 Likes

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.

1 Like

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

1 Like

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!

1 Like

Any update for this ?

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

2 Likes

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.

1 Like

Has this been actioned? I too have been battling with this headache for a very long time.

Thank you all for the report. I’ve added a Github issue for ease of tracking

This one is in progress, is it?

Any Update?

Folder sorting, code auto format, and everyday will crash at least once
This is really annoying, can please focus more on user experience?

BUMP

Please provide an update on whether this bug (this is not a feature request, you should have always been able to turn off the auto-formatting) has been at least put onto a road map.

Annoyances are one thing, but this now regularly breaking my code and I’ve already set the script window as the default.

I’m doing soap web service test cases and traversing the xml using find with closures, similar to:

String code = parsed.depthFirst().find{it.@name == 'UNIQUE_NAME'}.text()

Pretty straight forward.

I don’t ever use the manual window with these. But I do routinely add web service objects via the Plus Icon and “Add to existing test case”.

Then, when its added and I’m transferred back to the test case it has changed that line to this:

String code = parsed.depthFirst().find({ 
         == 'UNIQUE_NAME'
    }).text()

COMPLETELY BREAKING IT. This is not ‘reformatting’-- it’s deleting code!

I have tons of these and I don’t have them all memorized. I don’t always see it and it becomes a problem to rewrite it if I didn’t think to copy it out first.

I can’t even think of all the untold hours I’ve wasted on this.

Guys, this is a bug-- serious bug. No formatting should DELETE code. Please consider bumping this up in the list of priorities.

Thanks!

@just-passin-thru

Do you mean “Plus icon and Add to existing test case” as this?

I agree it would be a bug.

But I am afraid Katalon team would not read your post above, so they would not notice it. Katalon team once wrote that they are not committed to read this “User forum”. See

as @Jass wrote:

the forum support is voluntary and pretty much relies on our community users to help each other. There is no a specific person in the Katalon team to be accountable for providing support on Forum. As a KSE and KRE user, you can support a Zendesk ticket for better support as we have dedicated people there.

@just-passin-thru

Do you have a paid license of KSE or KRE? If so you should submit a request for support at

You should no longer use the “Plus icon > Add to existing test case”.

Alternative operation is possible. You want to:

  1. save the new web service object
  2. open the existing test cases script in the Test Case Editor in Script mode; then you want to manually add a line:
WS.sendRequest(findTestObject('your_new_web_service_object'))

Editing the test case script manually in Script mode would not break your code, of course.

You are done. This would result in the same as “Add to existing test case”. I think that “Add to existing test case” does very little thing.

I suppose, you don’t really need the “Add to existing test case” feature, do you?