*** Refactoring of Method name doesn't seems to work ..... ***

Refactoring of Method name doesn’t seems to work for me, i.e. the method name isn’t updated across the testcases … Where as refactoring of Custom Keywords works… i.e. all the testcases are updated as per the Keyword changes.

@devalex88 @kazurayam @Russ_Thomas @Brandon_Hein

Have you guys faced a similar issue or am I doing something WRONG?

Let me confirm what you mean. Does the following sentences describe what you did?

  1. You created, in the Keywords folder, a package named a_constructor.
  2. In the package a_constructor, you created a class named Test.
  3. In the class a_constructor.Test, you defined a method as static void named Hello.
  4. Possibly you have created one or more codes in the Test Cases folder as following:
a_constructor.Test.Hello()
  1. Then you wanted to change the Method name: Hello to hello, for example.
  2. You re-opened the source of Keywords/a_constructor/Test class, used the tool Refatoring of Method while you expected that the testcases should be automatically updated to have:
a_constructor.Test.hello()
  1. But it did not work in test case. Hello() stayed unchanged.
  2. You tried another case. You put a @Keyword annotation to the Hello() method.
    @Keyword
    static void Hello() {
        ...
    }
  1. And you rewrote test cases to have:
CustomKeyword.'a_constructor.Test.Hello'()
  1. You tried Refactor > Rename the Hello to hello.
CustomKeyword.'a_constructor.Test.hello'()
  1. This time, the test case code was auto-updated as above.

Anything different from what you mean?

1 Like

@kazurayam your understanding is absolutely correct… :smiley:

You have exactly phrased … what was I doing. Appreciate it.:+1:

Earnestly expecting your reply on this problem.

Thanks Again

@ThanhTo,

I expect you can respond to this.

Hi @focis.automation, @kazurayam

I have successfully reproduced the issue, can’t tell you why yet but we will be looking into this.

Cheers !

@focis.automation, @kazurayam

Seems to be a problem with the GroovyEditor library that we’re using, we will try to see if the new newer versions resolve this issue. In the mean time, please stick with the CustomKeyword declaration.

Cheers !

Thanks @kazurayam , @ThanhTo

Hi ThanhTo, there are times… we need to call a Custom Keyword, within a Custom Keyword. The only way to achieve is to call the method in Keyword.