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.
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()