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
Global Parameter in Program File
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Global Parameter in Program File
Hi,
Regards,
Peter
Ranorex Team
Sorry but this is not possible. Do you want to repeat the whole test suite or only a few recordings?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
Regards,
Peter
Ranorex Team
-
- Posts: 94
- Joined: Tue Jun 16, 2009 10:27 pm
Re: Global Parameter in Program File
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Global Parameter in Program File
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.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
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
-
- Posts: 94
- Joined: Tue Jun 16, 2009 10:27 pm
Re: Global Parameter in Program File
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?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Global Parameter in Program File
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:costamesakid wrote:Is there a way to bind a global parameter to a variable defined in a user code module?
http://www.ranorex.com/support/user-gui ... html#c3112
Regards,
Alex
Ranorex Team
-
- Posts: 94
- Joined: Tue Jun 16, 2009 10:27 pm
Re: Global Parameter in Program File
Exactly what I needed. Works great! Thanks
Re: Global Parameter in Program File
Can't find the "Insert Module Variable" context menu entry in 3.1 - was it removed or am I missing some magic?Support Team wrote: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
...
All the best,
D.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Global Parameter in Program File
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
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
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)

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
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