Why does Katalon Studio randomly erase test cases?

Katalon Studio 8.5.5-a47e123f is randomly erasing my test cases. Once in a while after I double click on a test case in the Test Cases folder, it opens the test case in a new tab, but the tab is empty.
I have tried closing and reopening the test case and shutting down and restarting Katalon Studio, but that test case remains empty.

Background: I created my first test case as a recording of a web session, where I deliberately touched every control. I then used Script mode to edit the test case down to just the sequence of actions I wanted. Once I had a master test case, I have been Copy and Pasting entries in the Test Cases list of the Tests Explorer to create new test cases.

The typical sequence is:

  1. Right click on a test case in the Test Cases list and click Copy
  2. Right click on any test case in the Test Cases list and click Paste to create a “test case - Copy”
  3. Rename the copied test case
  4. Edit the new instance of the test case to test slightly different functionality
  5. Click Save for the modified new test case.
  6. Once in a while close some test case tabs when there are getting to be too many.
    Sometimes Step 3 is done after Step 5.
    Do the above sequence a number of times (10-20?).

Once in a while (it has happened at least twice this morning) I will open up one of the older scripts and the edit window that should include all the script steps is blank.

I have tried to reproduce the case doing the above steps and variations on them but have not yet been able to reliably reproduce the bug. It may depend on how many tabs are open or how much copying has recently been done.

But the contents really are gone. When right-clicking on the test case, I chose Open Enclosing Folder which took me to “Katalon Studio//Test Cases”. The .tc file for the empty script looks like all the others, with proper contents, but when I went to the “Katalon Studio//Scripts” folder, all the other scripts are 3KB, but the two empty scripts are 0 bytes. So something caused them to become empty.

Anybody know what sequence of steps I should avoid to avoid this bug?

Also, could someone pass this on to Katalon Support for me, please?


Hi anh Duy, could you take a look at Mark’s case here? Many thanks anh!

You renamed test cases.

See the following post:

I would warn All Katalon Users.


You may lose your code.

Instead of renaming an existing Test Case, create a new Test Case with a favorable name, and copy the script source from the old one to the new one. This way is safe.
… You don’t like it? Well, neither do I.
But it’s better than loosing the code entirely.

Katalon Studio updates all references to the Test Case which you are to rename, as the following screenshot tells:

Imagine, you renamed a Test Case which is refered by many other Test Cases and Test suites, and got a failure. A total disaster.

1 Like

I usually first make a copy of the test case so I can restore it if needed. Pretty much the same thing Kaz suggested.

Before renaming I make the copy:
CheckLogin - Copy

After renaming I delete the copy if the renaming worked:
CheckLogin - Copy

this is not an excuse for Katalon stuff to not fix such shitty issue.
i am getting tired, as a comunity member, to wipe the *** of katalon development staff for critical issues.
i am still here for fun, but this is no longer funny
@vu.tran let me know if escalation is needed.
fyi, we, as users, we may have some other channels to ‘promote’ your products

Katalon team have been aware of this problem over last 10 months and has left it unresolved. They seem to be busy developing something else. So I suppose that they would NOT be able to fix this problem in the near future. This problem may accidentally occur to anyone.

:bomb: WARNING Someday your test case code may be erased by Katalon Studio.

How to help yourself? ---- Start using Git before the disaster.

I always use Git to make a fly-weight local backup of the project. The local Git repository will always rescue me from the glitches of Katalon Studio.

  1. I make local Git repositories for each of all Katalon projects of mine.
  2. Just before renaming a Test Case, I will commit the current “healthy” files into the main branch.
  3. I will create a temporary branch.
  4. I will check out into the temporary branch
  5. Then I will try renaming a Test Case.
  6. I will make very sure if renaming a Test Case hasn’t caused any troubles in the project. I will run full set of Test Cases to see the status of the project.
  7. When assured, I will commit all changes into the temprary branch;
  8. I will check out the main branch;
  9. I will merge the temporary branch into the main branch.
  10. I will make sure the main branch is OK, then delete the temporary branch
  11. At the step 6 if I found anythng wrong , I will check out the main branch where my healthy set of files remain unbroken. I will drop the dirty temporary branch away.

Git saves us all !

1 Like