Hi guys, I’d like to ask if it is possible to create and change global variables in a test case.
I want to pass a variable from TC1 to TC2 (var1 is created in TC1, it finishes, TC2 starts and var1 can be used in TC2 execution).
Are there any available methods to access (global) variables? Or is there any other way how to achieve behavior I mentioned above, maybe TestData? I found only get methods in documentation, no set methods for TestData class.
Is there a way to make these persistent after a run ends? I’m using an Excel to drive the data for my GlobalVariables, but would like to only run it whenever I change environments or we run a test suite. Currently, I have to have the TestHook run before every test case.
for (int index = 0; index < environmentData.getRowNumbers(); index++) {
Admittedly I have not tried it yet, but how does the GlobalVariable aspect behave with respect to parallel execution on multiple browsers? Will each thread have its own GlobalVariable space / object ?