Can I map a repository variable to a global variable?

Ranorex Spy, Recorder, and Studio.
Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Can I map a repository variable to a global variable?

Post by Pixi6s » Mon Oct 24, 2011 4:06 pm

I switch the server I am testing on a bunch at my job. I have global variables for the domain to help me switch between them. Then in the repository I also have Domain variables. Is there anyway I can map my repository variables to my domain variables?

Right now I have to change 2 global variables, 2 repo variables, then the SQL server my (several) data sources are pointing to. It is getting a bit ridiculousness.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Can I map a repository variable to a global variable?

Post by Support Team » Mon Oct 24, 2011 4:11 pm

Hi,

I guess you are searching for following documentation
http://www.ranorex.com/support/user-gui ... html#c2985

Regards,
Peter
Ranorex Team
.
Image

Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Re: Can I map a repository variable to a global variable?

Post by Pixi6s » Mon Oct 24, 2011 4:40 pm

That does tell me know to setup global variables. Now how do I map those variables to the repository to use them within my repo path?

I added some pix to try and help explain. Currently The variables in the repo are referring to repo variables of the same name. But it's duplicate information. I'd rather them mapped to the global variable.
Attachments
global.JPG
global variables I have setup and bound to my modules
global.JPG (41.13 KiB) Viewed 2696 times
repo.JPG
duplicate variables in repo
repo.JPG (34.66 KiB) Viewed 2696 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Can I map a repository variable to a global variable?

Post by Support Team » Tue Oct 25, 2011 9:02 am

Hi,

If you added you Global Parameters you have to bind them in the Test Suite. If you open your TestCases you will find following screen
Test Case Properties.png
Test Case Properties.png (31.88 KiB) Viewed 2688 times
In the Parameters section you can now bind the global variables to your repo variables.

Regards,
Peter
Ranorex Team
.
Image

Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Re: Can I map a repository variable to a global variable?

Post by Pixi6s » Tue Oct 25, 2011 3:45 pm

Thanks for the reply, but I am still lost. I do bind my global variables there to the variables with my code and record modules. But how to I bind them to my specific repo variables. They are not available in the drop down list.

Do I map them within my modules? I can look into that more... i just wanted to get this message out in case I am barking up the wrong tree.

thanks
S
Attachments
repovar.JPG
Repo variable where to set and where its used
repovar.JPG (52.31 KiB) Viewed 2682 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Can I map a repository variable to a global variable?

Post by Support Team » Tue Oct 25, 2011 4:12 pm

Pixi6s wrote:Do I map them within my modules? I can look into that more... i just wanted to get this message out in case I am barking up the wrong tree.
Yes you have to map your global parameters with you modules. Therefore you have to open the parent testcase of your module and the you can map the global test suite parameter. Or you use a code module to map the parameters at the beginning.

Regards,
Peter
Ranorex Team
.
Image

Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Re: Can I map a repository variable to a global variable?

Post by Pixi6s » Tue Oct 25, 2011 4:14 pm

oh I got it! Brain kicked in.

I created a code module that fires first whose only job is to map the global variables to the repo variables.

Thanks for your help
Sierra