Is there Any ways to create the all the user defined function and store then in one place

Is there Any ways to create the all the user defined function and store then in one place . so that we can just link (Extend) the library file and reuser the function in our test .

Anything apart from Custome Keyword .

2 Likes

I have the same need. I have 1000+ methods that I want to wrap and add as custom keywords. I can automate the creation of the files that wrap these methods as keywords. …but I need a mechanism to “import” them to Katalon Studio.

Perhaps I’m not understanding the issue…

Are these Groovy methods? If so:

Create a package/keyword file with class utils:

package com.my_company
// regular imports here

public class utils {

  static void my_method(args) {
    // stuff
  }

  static void my_other_method(args) {
    // stuff
  }

  // etc.
}

Then in your TestCases:

// regular imports here

import static com.my_company.utils.*

// Tests using your methods...

my_method(...)

my_other_method(...)


Sorry if I misunderstood.

Russ