# BUG - Failed renaming test case deletes content

**URL:** <https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835>\
**Category:** Bug Report\
**Tags:** bugs-report, katalon-studio\
**Created:** [March 21, 2018, 10:32am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835 "2018-03-21T10:32:28Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian1](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@ian1](https://forum.katalon.com/u/ian1)\
**Post date:** [March 21, 2018, 10:32am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/1 "2018-03-21T10:32:28Z")

</div>

## **OS** : Windows 7

## **Katalon Studio Version:** 5.1.3

\*\*## Katalon Studio logs: \*\*[katalon.versionNumber=5.3.1katalon.buildNumber=1!SESSION 2018-03-21 10:19:51 - Pastebin.com](https://pastebin.com/PdVENXEj)

**## Environment:** N/A

**## Steps to reproduce:**

1. Open katalon studio, then open an existing project
2. Open a test case
3. Attempt to rename the open test case making sure to have a trailing space at the end
4. Observe error “Unable to rename the test case”
5. Re-open the test case

**## Expected Behavior:**

Test case content should still exist after renaming errors

**## Actual Behavior:**

Test case content no longer exists

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [March 22, 2018, 3:18am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/2 "2018-03-22T03:18:42Z")

</div>

> [ian](https://forum.katalon.com/profile/5212/ian) said:
> 
> ## **OS** : Windows 7
> 
> ## **Katalon Studio Version:** 5.1.3
> 
> \*\*## Katalon Studio logs: \*\*[katalon.versionNumber=5.3.1katalon.buildNumber=1!SESSION 2018-03-21 10:19:51 - Pastebin.com](https://pastebin.com/PdVENXEj)
> 
> **## Environment:** N/A
> 
> **## Steps to reproduce:**
> 
> 1. Open katalon studio, then open an existing project
> 2. Open a test case
> 3. Attempt to rename the open test case making sure to have a trailing space at the end
> 4. Observe error “Unable to rename the test case”
> 5. Re-open the test case
> 
> **## Expected Behavior:**
> 
> Test case content should still exist after renaming errors
> 
> **## Actual Behavior:**
> 
> Test case content no longer exists

Can I ask why do you attempt to add trailing spaces at the end of your test case’s name?

---

<div class="post-metadata">

**Author:** ![Salah1](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@Salah1](https://forum.katalon.com/u/Salah1)\
**Post date:** [July 3, 2018, 1:41pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/3 "2018-07-03T13:41:15Z")

</div>

Hello,

Any answer how to recover the original content please? I am in the same situation here.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [November 2, 2019, 4:42am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/4 "2019-11-02T04:42:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 20, 2022, 12:44am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/5 "2022-05-20T00:44:29Z")

</div>



---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 20, 2022, 12:45am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/6 "2022-05-20T00:45:15Z")

</div>

Even in v8.3.0, this problem still persists.

I do not understand why Katalon team leaves this fundamental/primitive BUG unfixed

---

<div class="post-metadata">

**Author:** ![nam.nguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nam.nguyen/32/18640_2.png) [@nam.nguyen](https://forum.katalon.com/u/nam.nguyen)\
**Post date:** [May 24, 2022, 12:28pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/7 "2022-05-24T12:28:29Z")

</div>

Hi @kazurayam,

Are you using Windows 7 too?  
And how do you make the renaming failed?

Nam Nguyen.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 24, 2022, 12:30pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/8 "2022-05-24T12:30:23Z")

</div>

I am using macOS 12.3.1

---

<div class="post-metadata">

**Author:** ![nam.nguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nam.nguyen/32/18640_2.png) [@nam.nguyen](https://forum.katalon.com/u/nam.nguyen)\
**Post date:** [May 25, 2022, 3:09am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/9 "2022-05-25T03:09:11Z")

</div>

Hi @kazurayam,

We tried to reproduce the issue on both Windows 10 and MacOS 12.0.1.  
But the results are all the same: Renaming has no issue and the test case name is trimmed.

Could you please record and send us the video of the error and the error log?

Nam Nguyen.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 25, 2022, 10:26am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/10 "2022-05-25T10:26:38Z")

</div>

I believe you haven’t tested a case where you have **subfolders** under the `Test Case`. Katalon Studio can not manages _subfolders_ under the `Test Cases` folder properly.

Please follow the steps I described at

> [@Script code vanished when a test case is renamed](http://forum.katalon.com/t/v8-3-0beta-script-code-vanished-when-test-case-is-renamed/63016):
>
> Katalon Studio v8.3.0.beta macOS Monterey 12.2.1 I created a GitHub project where you can see the bug reproduced. step1 I created a script [Test Case/sub/TC1](https://github.com/kazurayam/CodeVanishedWhenTestCaseRenamed/blob/step1/Scripts/sub/TC1/Script1646221324643.groovy), this had no problem step2 I moved the script to [Test Cases/sub/subsub/TC1](https://github.com/kazurayam/CodeVanishedWhenTestCaseRenamed/blob/step2/Scripts/sub/subsub/TC1/Script1646221324643.groovy), this had no problem step3 I renamed the script to [Test Cases/sub/subsub/Main](https://github.com/kazurayam/CodeVanishedWhenTestCaseRenamed/blob/step3/Scripts/sub/subsub/Main/Script1646222028338.groovy) step4 I renamed the script to Test Cases/sub/subsub/Test, Test Cases/sub/subsub/TestTest, Test Cases/sub/subsub/testesttest ---- and found that the script code has vanished. The Git…

> [@nam.nguyen](#):
>
> Could you please record

No I wouldn’t. Making a movie is tiresome. The above GitHub repository has the branches step1, step2, step3 and step4; which you can easily checkout and see. That should be enough.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 25, 2022, 10:31am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/11 "2022-05-25T10:31:56Z")

</div>

A Katalon Studio project contains 2 folder corresponding to a single Test case:

- `<projectDir>/Test Cases/sub/subsub/TC1.tc`
- `<projectDir>/Scripts/sub/subsub/TC1/Scriptxxxxxxxxxx.groovy`

Theoretically these 2 folders should be always in sync.

But I found the `Script` folder goes out of sync when I rename/move a Test Case. I believe, KS has a bug here.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 20, 2022, 12:49pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/12 "2022-10-20T12:49:56Z")

</div>

Any update on this BUG?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 14, 2022, 12:14pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/13 "2022-12-14T12:14:33Z")

</div>

No update on this BUG yet?

---

<div class="post-metadata">

**Author:** ![ashraf.madina](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ashraf.madina/32/20464_2.png) [@ashraf.madina](https://forum.katalon.com/u/ashraf.madina)\
**Post date:** [February 12, 2023, 12:34am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/14 "2023-02-12T00:34:07Z")

</div>

I just experienced this… and i’m sure now it explains why sometimes I felt like I was losing test scripts but wasn’t sure why. so I created about 10 test scripts and moved them to a different folder…tried to rename a few… after few hours when i came back,  
the codes were deleted…just left with empty test cases.

i was able to retrieve some of them by going to Git and commit and checking the differences… before had code, after was null.

This is a critical issue and not something that should be in production system. Why is this issue not resolved? It’s been reported so many times.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 12, 2023, 1:05am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/15 "2023-02-12T01:05:58Z")

</div>

I found a way to reproduce this problem, which has been left open over 4 years!

See

> [@Katalon Studio erased a Test Case code when it was moved, and then renamed](http://forum.katalon.com/t/katalon-studio-erased-a-test-case-code-when-it-is-moved-and-renamed/84169/):
>
> This post follows my previous post: I believe that I have found out a procedure how to reproduce the incident (Test Case code is erased by Katalon Studio). So I would explain it here. I used 2 machine environments. The issue was reproduced on both. MacOS12.6 + Katalon Studio 8.3.0 Windows 10 + Katalon Studio Standard Editon 8.4.1 I did: Create a new Katalon Project Create a new Test Case at Test Cases/sub/subsub/TC1. The code is just skeltal as follows: import com.kms.katalon.cor…

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 18, 2025, 7:14am UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/16 "2025-10-18T07:14:05Z")

</div>

v10.3.2 still has a bug around moving/renaming a test case. See

[http://forum.katalon.com/t/test-case-loses-its-code-when-moved-over-another-test-case-with-the-same-name/183734](http://forum.katalon.com/t/test-case-loses-its-code-when-moved-over-another-test-case-with-the-same-name/183734)

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 28, 2025, 1:48pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/17 "2025-10-28T13:48:59Z")

</div>

You can find a complete procedure to produce the bug:

[http://forum.katalon.com/t/retelling-test-case-loses-its-code-when-moved-over-another-with-the-same-name/184898](http://forum.katalon.com/t/retelling-test-case-loses-its-code-when-moved-over-another-with-the-same-name/184898)

---

<div class="post-metadata">

**Author:** ![nghi.phan](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nghi.phan/32/30970_2.png) [@nghi.phan](https://forum.katalon.com/u/nghi.phan)\
**Post date:** [October 28, 2025, 2:49pm UTC](https://forum.katalon.com/t/bug-failed-renaming-test-case-deletes-content/9835/18 "2025-10-28T14:49:55Z")

</div>

Dear Mr Kazu,

I have passed on all necessary information for our PMs, thank you so much for your insights. We will keep you updated.

Bella
