Looking to define variable that is available to one test suite, not global variable

In Katalon Studio is it possible to create variables that are used by test cases in one test suite? I don’t want to use Global Variables as this is a variable that will only be used in a singe test suite. Example:

Test Suite 1 - Document feature tests

  • Test Case 1 - Create document with variable {DOCUMENT_NAME}
  • Test Case 2 - Click on document with variable {DOCUMENT_NAME} and edit it

So {DOCUMENT_NAME} is only available to Test Suite 1. It is not a global variable.


It can be done. See here:

You can create the {DOCUMENT_NAME} in TC1 and return the value, and then call TC1 from TC2 and use the {DOCUMENT_NAME} from TC1.

Thank you for responding. I’m new to Katalon Studio so excuse me if I ask a dumb question.

Is it standard to have a test case created to initialize variables that will be called by all the test cases in a test suite? I’m assuming I would return a list or array or some sort with relevant data in that initializing test case?


If I get it correctly, you need some kind of dataset, which would be stored somewhere and it would be present in all your test cases. Maybe a custom keyword would be beneficial for you. Something like this:

public class SampleKeyword {
	public static List giveMeMyVariables() {
		// do whatever to fill your list 
		List variables = Arrays.asList("my variable", "another one", "one more")
		return variables

And call it in your test cases.

List getVariables = SampleKeyword.giveMeMyVariables()

I was hoping Katalon Studio had something built in that I could use but yeah this is one custom way I could do it. thank you