Global variables and start app

Ask general questions here.
Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Global variables and start app

Post by Mayra » Wed Mar 05, 2014 8:39 pm

Hi,
I see Ranorex has the concept of Global Variables.
I want to launch the same url in each of my test cases.
I created a module for starting the application. Then I call it with each of the test cases, but I have to bind the module to the Global Parameters each time.
My questions are:
- Is there a way to have a method , in this case startApp before all other steps of the test case without having to specify it each time.
- If the above is not possible, I have to bind the variables each time the module is used. Is there a way to bind the Global Parameters to the module where the startApp is?Actually I see in the Global Parameters a column for "Module Variable" but I do not see any way where I can choose which variable to bind.
Thanks

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Global variables and start app

Post by Mayra » Thu Mar 06, 2014 9:04 pm

OK, i can see the conceptof set up and tear down. I hope I can use them for a group of test cases and bind global vars for some of the parameters and other ones not.

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Global variables and start app

Post by Mayra » Thu Mar 06, 2014 11:30 pm

OK. So I can see that I can have my set up bound to global variables.
In my case,all except one of my variables for set up will come from global variables. That other variable, varies by test case. How can I do that?

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

Re: Global variables and start app

Post by Support Team » Mon Mar 10, 2014 2:35 pm

Hello Mayra,

You can bind your module variable either to a data source or to a global variable.
Just create a new data source within your “Test Case Properties” and bind a module variable to the newly created data source.
TestCaseProperties.png
TestCaseProperties.png (18.07 KiB) Viewed 844 times
A very detailed instruction on how to deal with data binding can be found here

I may invite you to attend one of our free Ranorex webinars which is held by one of our skilled training instructors.The webinar will provide a broad overview of the capabilities and features of Ranorex for desktop, web and mobile environments.

Regards,
Robert
.
Image