I’m wondering if someone has the same problem with me. Currently I’m able to run Katalon WebService Tests to some extent and now I’m trying to use GlobalVariable.
But I can run it if I include both in a Test Suites. Is there any way that I can use global variable accross single Test Cases without using Test Suites?
so currently there’s no way to set global variable and use it on another test case? because I need to use several variables at once and it seems that I cant create Java class to contain those variables. Perhaps I’ll use Map then?
Unfortunately, there is no option like “Method” for GlobalVariable, system converts the method above to string.
You can create your own class with variables in Custom Keywords.
public class MyVariables {
public static String projectDir = RunConfiguration.getProjectDir()
}
// And then, in your test case simple write:
...
MyVariables.projectDir
...
// OR, use RunConfiguration.getProjectDir() directly in your test to get current project directory