Sharing variables within a test suite?

Ask general questions here.
tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Sharing variables within a test suite?

Post by tallahassee101 » Thu Mar 24, 2011 7:49 pm

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.

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

Re: Sharing variables within a test suite?

Post by Support Team » Thu Mar 24, 2011 11:02 pm

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

User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Re: Sharing variables within a test suite?

Post by Gunner1980 » Mon Mar 28, 2011 10:30 pm

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.

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

Re: Sharing variables within a test suite?

Post by Support Team » Mon Mar 28, 2011 10:41 pm

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

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Sharing variables within a test suite?

Post by tallahassee101 » Wed Jun 22, 2011 8:06 pm

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

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

Re: Sharing variables within a test suite?

Post by Support Team » Fri Jun 24, 2011 8:20 am

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