Storing variable value

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 20
Joined: Thu May 09, 2013 10:44 am

Storing variable value

Post by generalecaster » Thu May 09, 2013 10:54 am

Hi all,

I neet to store the value of a variable in the test case TC1 and use it in TC2 on the same level.
I'm trying storing the value in an unbound variable, but it's non visible in the other TC.
I've tried using Data Source, binding 2 vars (1 for TC1 and 1 for TC2) to its row, but it not works.
My last try is using this code:

Code: Select all

NumeroPolizza = "XYZ";
var dataConn = DataSources.Get("myDataSource");
dataConn.Rows.Add(new string[] { NumeroPolizza });
but ... nothing ...

The structure of my Test case is:


Thank you

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Storing variable value

Post by Support Team » Mon May 13, 2013 1:08 pm


In order to pass the value of a variable from one test case to another you could use a global parameter.
You could bind the different variables of the test cases to one global parameter. This will ensure that the value of the variable of the "next" test case will be set to the value of the variable of the first test case.