How to fix missing import automatically after imported file is moved

Hi,

There are the Test Case(A) that imports the specific Keyword file(B).
I’d like to fix missing the imported path of B automatically in A after B is moved to another directory.
Is there a way to do that?

Best regards.

Unfortunately Katalon Studio has a bug.

Provided that

  1. you have Keywords/util/Sample.groovy
  2. you have Test Cases/A which has a line import util.Sample

And
3. you move Keywords/util/Sample.groovy to Keywords/helper/Sample.groovy by a drag&drop operation in the Test Explorer pane

You will expect
4. The Test Cases/A will be automatically updated: change import util.Sample to import helper.Sample

But, I know, Katalon Studio 7.9.1 does not do (4). import util.Sample stays unchanged.

The only way for you is to edit the Test Case/A manually.


As for code refactoring (renaming files, classes etc), I know Katalon Studio has a lot of shortages.

@duyluong
@ThanhTo

Team should pay more attention to these fundamentals, I think.

2 Likes

Oh, I see.
I’ll do that manually.
Thank you for replying.

But, I know, Katalon Studio 7.9.1 does not do (4). import util.Sample stays unchanged.
The only way for you is to edit the Test Case/A manually.

Hi @kazurayam, @shunmatsu_begginer

Our development team acknowledge this issue and put it in our backlog to resolve in further releases. Thanks for your report

1 Like