V8.3.0beta; script code vanished when test case is renamed

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, this had no problem
  • step2 I moved the script to Test Cases/sub/subsub/TC1, this had no problem
  • step3 I renamed the script to Test Cases/sub/subsub/Main
  • 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 GitHub repository has 4 tags, so you can trace what I did.

I looked at the 2 folders <projectDir>Test Cases and <projectDir>/Script and found that 2 folders has become inconsistent.

I looked at the Katalon’s .log file, where I found a StackTrace:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2022-03-02 20:55:53.947
!MESSAGE 
!STACK 1
org.eclipse.core.internal.resources.ResourceException(/%Users%kazuakiurayama%katalon-workspace%CodeVanishedWhenTestCaseRenamed%CodeVanishedWhenTestCaseRenamed.prj/Scripts/sub/subsub/TestTest/Script1646222137979.groovy)[368]: java.lang.Exception: File not found: /Users/kazuakiurayama/katalon-workspace/CodeVanishedWhenTestCaseRenamed/Scripts/sub/subsub/TestTest/Script1646222137979.groovy.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:835)
	at org.eclipse.core.internal.resources.File.getContents(File.java:275)
	at org.eclipse.core.internal.resources.File.getContents(File.java:266)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.getScriptContent(TestArtifactScriptRefactor.java:208)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.replace(TestArtifactScriptRefactor.java:159)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferences(TestArtifactScriptRefactor.java:281)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferenceForTestCaseFolder(TestArtifactScriptRefactor.java:261)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferenceForProject(TestArtifactScriptRefactor.java:247)
	at com.kms.katalon.dal.fileservice.manager.TestCaseFileServiceManager.updateTestCase(TestCaseFileServiceManager.java:131)
	at com.kms.katalon.dal.fileservice.dataprovider.TestCaseFileServiceDataProvider.updateTestCase(TestCaseFileServiceDataProvider.java:27)
	at com.kms.katalon.controller.TestCaseController.updateTestCase(TestCaseController.java:126)
	at com.kms.katalon.composer.testcase.handlers.RenameTestCaseHandler$2.run(RenameTestCaseHandler.java:83)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2022-03-02 20:55:53.947
!MESSAGE File not found: /Users/kazuakiurayama/katalon-workspace/CodeVanishedWhenTestCaseRenamed/Scripts/sub/subsub/TestTest/Script1646222137979.groovy.
!STACK 0
java.lang.Exception: File not found: /Users/kazuakiurayama/katalon-workspace/CodeVanishedWhenTestCaseRenamed/Scripts/sub/subsub/TestTest/Script1646222137979.groovy.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:835)
	at org.eclipse.core.internal.resources.File.getContents(File.java:275)
	at org.eclipse.core.internal.resources.File.getContents(File.java:266)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.getScriptContent(TestArtifactScriptRefactor.java:208)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.replace(TestArtifactScriptRefactor.java:159)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferences(TestArtifactScriptRefactor.java:281)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferenceForTestCaseFolder(TestArtifactScriptRefactor.java:261)
	at com.kms.katalon.groovy.reference.TestArtifactScriptRefactor.updateReferenceForProject(TestArtifactScriptRefactor.java:247)
	at com.kms.katalon.dal.fileservice.manager.TestCaseFileServiceManager.updateTestCase(TestCaseFileServiceManager.java:131)
	at com.kms.katalon.dal.fileservice.dataprovider.TestCaseFileServiceDataProvider.updateTestCase(TestCaseFileServiceDataProvider.java:27)
	at com.kms.katalon.controller.TestCaseController.updateTestCase(TestCaseController.java:126)
	at com.kms.katalon.composer.testcase.handlers.RenameTestCaseHandler$2.run(RenameTestCaseHandler.java:83)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Conclusion

This bug has a fatal impact. This looks too silly.

I suppose that the v8.3.0 must not be released before this issue is fixed.

Otherwise I am afraid you would lose many customers.

@Jass
@duyluong

1 Like

I noticed that V8.2.5 has the same problem.

@kazurayam: For a serial of actions with rename and moving, before moving/rename it, please help to close the test test case, refresh the project. System works fine after that.

Could you please help to try again and let us know the result after refresh project

image

Note: Like other system, we users have a serial actions to the source data, refresh is required for next actions, example : Solr search engine.

Hope this information is useful.

No I won’t.

I would refuse your advice.

Hi @kazurayam

Thanks for reporting this bug. It is a regression bug reported by some other users as well. We’ll consider fixing it.

Happy Testing
Jass

I have never seen such fragility in IntelliJ IDEA.

I would never compare a GUI software like KS with a text search engine like Lucene.

Thanks @Jass,

Hope to see the issue fixed soon

FYI.

This bug still persists in the v8.3.0.

Carelessly enough, I renamed a test case script. And once renamed, my code in the test case script went away!

I regret that I forgot adding and committing the test case script into the local Git repository before renaming it.

I checked the latest v8.3.5. The bug still persists.

I would warn all Katalon Studio users.

DO NOT RENAME TEST CASES.

You may lose your codes.

If necessary, take a backup of your project before renaming your test cases.