Why is KSE changing scripts and how to avoid it?

Recently, we’ve been seeing another “feature” of KSE. It’s changing scripts by itself at the arbitrary time just because it “thinks” that // should not be in the beginning of lines but it should be indented. As a result, we are having the following problems:

  1. Push the file with // in the beginning (from the original computer)
  2. Pull the file (from a different computer)
  3. Do modifications
  4. Katalon desides that // should not be in the beginning of lines and modifies the file at the arbitrary time
  5. Push the file with both intentional (3) and unintqentional (4) modifications
  6. Pull the file (to the original computer) and get mulltiple ERRORS which we should waste our time to resolve.

Another problem is that the files are shown as modified even though there was now intentional modifications but we still need to double-ckeck it before comitting.

Who came up with such a beatiful feature? Anyhow. Thanks a lot for that useful “feature” and now can you please let us know how to get rid of it? Thanks again!

@gdearest07 Do you ever switch to Manual view then back to Script view? When Katalon chooses to reformat a script, it’s usually due to that – a well documented bug.

Please update your post with Katalon version, OS, etc.

@duyluong I thought you guys had promised a fix for this annoyance. Has it been addressed yet?

Moving to bug reports.

1 Like

Thanks, @Russ_Thomas, yes, I did. To be precise, sometimes I click on Manual view by mistake (I don’t use it) and then switch back to Script view. Subjectively, it looks like it can happen to any file opened in KSE regardless of switching. I’m going to pay more attention to switching.

Actually, I’ve just noticed that any test gets openned in Manual view after clicking on it.

image
Windows 11 Pro

@Russ_Thomas, @duyluong

Actually, I’ve just noticed that any test gets openned in Manual view after clicking on it.

2 Likes

@gdearest07

Have you upgraded Katalon Studio recently?

As @Russ_Thomas pointed out, there is a configuration option Preferences > Katalon > Test Case >> Default Open View : Manual View or Script View.

When you upgrade Katalon Studio to a new version, this option will be initialised to “Manual View”. Even if you had this option to be “Script View” in your previous installation, it won’t be carried over while upgrading.

After upgrading Katalon Studio, I always change this option to “Script View”. This is the 1st thing I do after upgrading.

1 Like

Hi @gdearest07,
As I understand, the incident in step 4 happens when you switch to “Manual Mode” by accident, right?
Or how do you do the modifications exactly?

Regards,
Nam Nguyen.

Hi @Russ_Thomas,

Excuse me because I do not follow this problem closely,
Could you please send me some references about the switching problem and responses from duyluong?

Nam Nguyen.

See this:

1 Like

Search: Search results for 'Script Manual ' - Katalon Community

Click the first link:

That topic is assigned:

image

@Brandon_Hein’s take:

From 2018

@ThanhTo’s Github report:

Oct 2021

Jan 2018

May 2018

March 2019

1 Like

Hi, @nam.nguyen.

I didn’t notice when exactly it was hapenning. Just saw the “results”. Howerver, I’m not sure that it’s related to switching to “Manual Mode” (as it was noticed by @Russ_Thomas ) only. I’ve seen the same “results” in Keywords, which have no “Manual Mode”:

By the way, despite the differences (produced by KSE, please see an example above), those differences are not highlighted at all in KSE and not detected by using “Next Difference”, ''Previous Difference". Is this expected? Thanks.

Hi @gdearest07,

Thanks for your information,
We’re working on the issue of reformatting the code.

However, it’d be much better if you helps us to seek the trigger of the issue so we could investigate it further.

Nam Nguyen.

Hi, @nam.nguyen,

The simplest trigger is just OPENING any KEYWORD file that had // at the very beginning of the line. That’s it. Nothing else is needed to totally screw up the file and the collaboration between our team members who are using KSE.

@gdearest07

I could confirm what you told us.

Before:

After opening a keyword source:

I could see the white spaces before // is erased.

1 Like

Thank you, @kazurayam. Though, in my case, it’s the other way around. The // at the beginning of a line gets shifted to the right (KSE works in mysterious ways))

In the tool bar of Katalon Studio, choose

Preferences > Java > Code Style > Formatter

As “Active profile” you would have “Eclipse [buit-in]”. Click Edit... button, then you will see the following dialogue:

In the dialog, you can find an option “Enable line comment formatting” option.

Try turn it on/off. You will see the indentation of line with // appears and disappears.

What you saw was the Code Formatting feature built-in Eclipse. You can chose whatever setting you like.

Also you can turn the code formatting on/off in the code.
How to? See

Please search in Goodle for further how to.

1 Like

@gdearest07’s issue is about code formatting performed by Eclipse platform. This is not about the original problem in Test Case scripts being reformatted by Katalon Studio. Another issue.

Thanks again, @kazurayam. OUR original problem IS that it didn’t happen before and then it started all of a sudden. So, obviuosly, something was changed in KSE, not on our side cause none of us changed anything (none of us has any idea what should be changed in those settings). Also, by @nam.nguyen’s request I provided the SIMPLEST triger that’s easy to reproduce.It’s quite possible that there are some other triggers.

I would pass @gdearest07’s comment to @nam.nguyen

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.