Page 1 of 1
Global Parameter in Program File
Posted: Thu Jul 07, 2011 11:41 pm
by costamesakid
Hello,
Is there anyway I can use a global parameter defined in my test case in my corresponding program.cs file for that test case?
For instance if I have global parameter 'repeats' set to a value of 10, is there any way I can set that global parameter to a variable defined in my program.cs file? Thanks
Re: Global Parameter in Program File
Posted: Fri Jul 08, 2011 10:05 am
by Support Team
Hi,
costamesakid wrote:
Is there anyway I can use a global parameter defined in my test case in my corresponding program.cs file for that test case?
For instance if I have global parameter 'repeats' set to a value of 10, is there any way I can set that global parameter to a variable defined in my program.cs file? Thanks
Sorry but this is not possible. Do you want to repeat the whole test suite or only a few recordings?
Regards,
Peter
Ranorex Team
Re: Global Parameter in Program File
Posted: Fri Jul 08, 2011 3:55 pm
by costamesakid
I want to be able to set the number of repeats for the entire test suite, per what test cases have been checked for execution. Thanks
Re: Global Parameter in Program File
Posted: Mon Jul 11, 2011 12:29 pm
by Support Team
costamesakid wrote:I want to be able to set the number of repeats for the entire test suite, per what test cases have been checked for execution. Thanks
We already have a future request in our bug tracking system. As I said currently it is not possible to repeat the whole test suite. I would suggest you to create a parent (of all your children test cases) test-case with an empty data-connector.
Another hack would be to use a for loop in the program.cs. But as I said this is a hack and not recommended by us.
Regards,
Peter
Ranorex Team
Re: Global Parameter in Program File
Posted: Mon Jul 11, 2011 3:52 pm
by costamesakid
Is there a way to bind a global parameter to a variable defined in a user code module? Currently it seems you can only bind global parameters to variables defined in the recording file?
Re: Global Parameter in Program File
Posted: Mon Jul 11, 2011 7:41 pm
by Support Team
costamesakid wrote:Is there a way to bind a global parameter to a variable defined in a user code module?
Yes, after you created a test variable in the user code module, this works exactly the same as with variables in recordings. See following section in the Ranorex User Guide on how to create variables in a user code module:
http://www.ranorex.com/support/user-gui ... html#c3112
Regards,
Alex
Ranorex Team
Re: Global Parameter in Program File
Posted: Tue Jul 12, 2011 3:49 pm
by costamesakid
Exactly what I needed. Works great! Thanks
Re: Global Parameter in Program File
Posted: Wed Sep 14, 2011 3:57 pm
by dman
Can't find the "Insert Module Variable" context menu entry in 3.1 - was it removed or am I missing some magic?
All the best,
D.
Re: Global Parameter in Program File
Posted: Wed Sep 14, 2011 4:22 pm
by Support Team
Hi,
Do you have considered that you can only use this functionality (adding Module Variable) in UserCode Modules?
In the Recording files you have to add variables, which are basically the same as Module Variables.
Regards,
Markus
Ranorex Support Team
Re: Global Parameter in Program File
Posted: Wed Sep 14, 2011 4:28 pm
by dman
my bad - I tried in a recording's user code .cs file
in a user code module the menu entry is in its place
Thank you!
D.
p.s. trying to solve my global information access problem (
http://www.ranorex.com/forum/post10434.html#p10434)
Re: Global Parameter in Program File
Posted: Fri Oct 28, 2011 2:10 pm
by tracy91
Hi, guys, registered to thank you
Hotel Thailand Directory for the great solution provided in here. You've saved tones of my nerves and time