Forum Discussion
ArtemS
Alumni
14 years agoHi Joffre,
You got the general idea: project and project suite variables are available to any test within a project or project suite. However the actual value retrieved from a variable would depend on whether it is declared as persistent or temporary. Persistent variables store their values unless they are explicitly re-assigned. Temporary variables reset their values to the default value each test run. See Project and Project Suite Editor - Variables Page.
Let me give an example:
Case A: Suppose, we have a project variable - Project.Variables.NomeServidor, its default value is "SRV-Def", and the variable is Persistent. In one of the tests, we re-assign its value to "SRV-TSBD-9I". Afterwards, the actual value of Project.Variables.NomeServidor in this test and in all the rest of the tests will be recognized as "SRV-TSBD-9I".
Case B: Suppose, we have a project variable - Project.Variables.NomeServidor, its default value is "SRV-Def", and the variable is Temporary. In one of the tests, we re-assign its value to "SRV-TSBD-9I". Afterwards, the actual value of Project.Variables.NomeServidor in this test instance will be recognized as "SRV-TSBD-9I". However, for all the other tests, the value of Project.Variables.NomeServidor will still be recognized as "SRV-Def".
PS. Also, note that project variables are accessed through the Project.Variables.<Variable_name> syntax. The Project.Variables part cannot be omitted.
Regards.