Global parameter I can change and flow down to all my cases.

Ask general questions here.
ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Global parameter I can change and flow down to all my cases.

Post by ModelingPaul » Thu Apr 05, 2018 11:07 pm

I am trying to create a global parameter (within my Test Suite) that ties to a local parameter in all my test cases such that when I change the global parameter all my local parameter in each test case switches to the updated global value.

For context, I am building a regression suite of test cases that will run 100s of test cases with a Key Sequence step in each test case where a command is typed to execute an application that I am testing. The command changes when I get a new build. For example, abc_v180203 for build 18.02.03 and then when I get 19.05.04 it will be abc_v190504. This way I don't have to update 100s of test cases to use the new build when I want to regression test them.

I have created a local variable in each test case by right clicking and selecting "As new Variable" and calling it ABC_executable with the default value abc_v180203. Then I created a global variable by right clicking on the Test Suite banner and selecting Global Parameters and then in the Global Parameters tab creating a parameter with the same name ABC_executable with the same value abc_v180203 but my Module Variable is listed as Unbound and when I click on Auto-Create or Auto-Bind it does nothing. I am currently using Ranorex 6.1.1 as we have not gotten 8.1 approved yet through our software board.

Am I doing this correctly or do I need to go down another path?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3950
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Global parameter I can change and flow down to all my cases.

Post by odklizec » Fri Apr 06, 2018 11:24 am

Hi,

6.1.1 is way too old and no longer supported, but what you are describing should work just fine in it. Could you please post a screenshot of the test suite? Without seeing the structure of your test suite, it's hard to tell what's wrong.

Are you sure the name of module variable and name of global parameter are exactly the same (different names would not auto bind). Also, what happens, if you rightclick the module with unbound variable and select "Data binding..." option (from context menu)? Do you see the global parameter listed in parameters section of data binding dialog? If not, then the global parameter most probably not defined at test suite level?
globalparam.png
globalparam.png (27.61 KiB) Viewed 212 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Re: Global parameter I can change and flow down to all my cases.

Post by ModelingPaul » Fri Apr 06, 2018 4:48 pm

I cannot post a screen shot because I am on a classified network and would have to go through a number of hoops to get it.

Also, the module variable in each test case and the global parameter are exactly the same. And I do see the global parameter listed in the parameter's section of the data binding dialog.

My test suite is as follows:

ABC_regression - Test Suite
....ABC19.05.04
..........ABC-1
...............PUTTY_startup
...............abc_1_1_some_name_case1 Unbounded variable: 1
...............abc_1_1_some_name_case2 Unbounded variable: 1
.
.
.
...............abc_1_4_some_name_case30 Unbounded variable: 1
..........ABC-2
...............PUTTY_startup
...............abc_2_1_some_name_case1


The Parameters name in the Data Binding tab when I right-click on the Unbounded variable and select Data Binding is ABC_regression.ABC_executable. The local variable in my test case is ABC_executable. The parameter name in the Global Parameters tab is called ABC_executable. And they all show Unbounded for the Module Variable.

ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Re: Global parameter I can change and flow down to all my cases.

Post by ModelingPaul » Fri Apr 06, 2018 5:04 pm

OK. I think I got it. I had to right-click on the ABC-1 level and select Data Binding and then in the Parameters pane I selected Auto-Create and then Auto-Bind and it populated the Module Variable column with a pulldown list of all my ABC_executable local variables for selection.

I guess I had to go to the lowest level in my Test Suite and bind them instead of from the top since the top level probably wouldn't see the local variables.

And now when I update my global parameter value my test cases should all use that update instead of what I specified in local variable, correct?

Thanks!