What is the scope of GlobalVariables

Hello,

I find very little information about what is the life and scope of values in GlobalVariables.

I wonder, if I have 4 TestSuites, that are parallelly executed from a TestsuitCollection, and all of them read and modify the same GlobalVariable, will they collide or clash with each other?

In summary:
Does each TestSuit have a copy of GlobalVariables for itself?
or are GlobalVariables completely shared among everything in the project at any time?

BR,
Ixent.

AFAIK, GlobalVariables would be TestSuite scoped in that instance, not TestSuiteCollection scoped, so you should be able to run/modify in parallel without clashing.

1 Like

Ok, thanks for the response.

Anywhere in the documentation where this is explained? if not
Shouldn’t this be included on some part of the documentation of Global Variables?
Seems a big point to me.

Thanks anyway, for now I will assume it works the way you mentioned.

Do you know If I can expect DEV comfirmation here?

Probably not.

Probably not.

I can give you an evidence of Brandon’s correctness. See the following screenshot:

A Test Suite Collection comprises with one or more runs of Test Suites. In the definition of a Test Suite Collection, you can assign which Profile to apply to each Test Suites. This implies that a Profile (= a set of GlobalVariables) is scoped for each run of a Test Suite.

In a Test Suite Collection, you can list single Test Suite more than once with different Profiles applied. In the above screenshot, you can find “Test Suites/CURA/Twins_capture” is listed twice. The first one has a Profile “CURA_ProductionEnv”. The second one has a Profile “CURA_DevelopmentEnv”. This association proves that a Profile is Test Suite scoped. Otherwise, the association can not be logically valid. — an inductive reasoning :wink:.

@ThanhTo

I have never read any description in the documentation on the scope of GlobalVariables. Please improve the documentation concerning this.

3 Likes

Thanks for your suggestions and involvement. I have logged a ticket for ease of tracking.

1 Like

Hi All,

Regarding your concerns over the scope of Global Variables, please refer to this document: Scope of Global Variables for more information.

We apologize for this late response.

Regards,
Shin

1 Like

Hello @Shin ,

Thanks for adding the clarification to the documentation!
Though I still find it a little confusing the way it is writen.

I’d suggest something like this for the first paragraph:

Scope of Global Variables

Global variables are Test Suite scoped. During runtime, if the value of any Global Variable is changed, this will not be shared among Test Suites. This infers that you can modify Global Variables in a particular Test Suite run without affecting the Global Variables of other Test Suites in the Test Suit Collection.

BR,
Ixent.

1 Like