Page 1 of 1

Sharing variables within a test suite?

Posted: Thu Mar 24, 2011 7:49 pm
by tallahassee101
Is it possible to create a variable that is created in RecordingA and reused in RecordingB? I'd like to split my recordings up into smaller files, but they would need to use the same set of variables.

Re: Sharing variables within a test suite?

Posted: Thu Mar 24, 2011 11:02 pm
by Support Team
Hello,

via code you can do that. Variables are public properties of the class. So you can access the variables of the other class.

In the action list for that class only the variables of that class are listed.

If the two recordings have the same repository, you can make repository variables, which would be listed in both action lists.

Regards,
Roland
Ranorex Support Team

Re: Sharing variables within a test suite?

Posted: Mon Mar 28, 2011 10:30 pm
by Gunner1980
Is there any plans to allow this to be done through the GUI minus having to use user code? I would like to request this as a feature as I have tons of user code doing this right now.

Re: Sharing variables within a test suite?

Posted: Mon Mar 28, 2011 10:41 pm
by Support Team
You're right, it should be handled also by the GUI, when splitting up a recording.
I'll forward your feature request.

Regards,
Roland
Ranorex Support Team

Re: Sharing variables within a test suite?

Posted: Wed Jun 22, 2011 8:06 pm
by tallahassee101
Could you explain how to create a repository variable?

"If the two recordings have the same repository, you can make repository variables, which would be listed in both action lists."

I've only ever created a recording variable and I need a variable I can share between recordings. Please explain how I could do this with/without user code.

Thank you

Re: Sharing variables within a test suite?

Posted: Fri Jun 24, 2011 8:20 am
by Support Team
Here is a link that should help.
http://www.ranorex.com/support/user-gui ... sting.html

Also, you'll notice that the repository editor and the recording editor have a button to edit variables.
To make a variable from the repository available to the recording, use the copy from repository button.
If you are using the action editor to select a variable from the repository it is automatically copied for you.

Regards,
Ron
Ranorex Support Team