Hi,
Ranorex warns me "The following module variables in module '...' are not bound to a data column: ...". I googled for the reason and found it related to data-driven testing, which isn't what I am doing here. In fact these variables are filled at run time with values that are calculated by user code. (I believe this is called "validation variable" in Ranorex speak.) All variables are defined in the "Edit variables" dialog and have proper default values.
What else do I have to do to do away with this warning?
Edit: Ranorex version 9.2.0.
Thanks
Hans
Warning message "Variables not bound"
Re: Warning message "Variables not bound"
Hi,
These warnings appear when you use module variables, but don't bind them to a data connector or parameter (data-driven testing).
If your test gets executed as expected, you don't have to worry about these warnings.
regards,
These warnings appear when you use module variables, but don't bind them to a data connector or parameter (data-driven testing).
If your test gets executed as expected, you don't have to worry about these warnings.
regards,
Re: Warning message "Variables not bound"
Out of habit, I always worry about warnings. The code I write has zero warnings before I submit it for production. By removing warnings from test cases I prevent the test department from repeatedly asking me about the warningyou don't have to worry about these warnings.
Ok, then, how can I change the "module variable" into something else that doesn't produce a warning?
Re: Warning message "Variables not bound"
Hi Hans,
You can disable the warning for each test case in the properties of the test case:
Does this help?
Regards,
McTurtle
You can disable the warning for each test case in the properties of the test case:
Does this help?
Regards,
McTurtle
You do not have the required permissions to view the files attached to this post.
Re: Warning message "Variables not bound"
Yes, this might help, but I don't know how to open this "properties" dialog. I tried this: Right-click the test case in the "Projects" window, then click "Properties" from the menu. That opens test case properties that do not even remotely resemble your screen shot.
Thanks anyway
Hans
Or: open "Properties" from the View menu but that doesn't contain this option either.
I must be missing something crucial...Thanks anyway
Hans
You do not have the required permissions to view the files attached to this post.
Re: Warning message "Variables not bound"
Hi,
What you have right-clicked is “Project” node. But you must go to “Test Suite” view and here right-click every single Test Case Container and its Properties uncheck the option suggested by McTurtle. There is unfortunately no global option for this warning.
What you have right-clicked is “Project” node. But you must go to “Test Suite” view and here right-click every single Test Case Container and its Properties uncheck the option suggested by McTurtle. There is unfortunately no global option for this warning.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Warning message "Variables not bound"
Hi odklizec,
thank you for your reply. This actually did the trick. No warnings anymore
Happy new year!
Hans
thank you for your reply. This actually did the trick. No warnings anymore
Happy new year!
Hans
Re: Warning message "Variables not bound"
I am using Ranorex 10.1.6 and I can only disable the warning for the whole test suite, not for single test cases which is a very broad stroke.
Is there a way to disable the warning for single test cases only?
Or can I tell Ranorex that I don´t want to bind the variable to any data source since it´s generated by my user code?
Is there a way to disable the warning for single test cases only?
Or can I tell Ranorex that I don´t want to bind the variable to any data source since it´s generated by my user code?
Re: Warning message "Variables not bound"
Hello ThoFi,
As a general note, I found it much better to bind all variables so it is much harder for binding errors to pass unnoticed. It nevertheless happens...
I can't say for 10.1.6 but in 10.1.3, I can set this flag for each container (test suite, test case, smart folder) individually. First of all, you must open the "Properties" tab. I managed to do that by right-clicking a file in the "Projects" tree and then selecting "Properties" from the pop-up menu. I guess there is a more intuitive way but I didn't find it. When now you click a container in the test (the open rxtst file), the "Properties" contains the "Warn for unbound variables" option.I am using Ranorex 10.1.6 and I can only disable the warning for the whole test suite, not for single test cases which is a very broad stroke.
As a general note, I found it much better to bind all variables so it is much harder for binding errors to pass unnoticed. It nevertheless happens...
Re: Warning message "Variables not bound"
Thank You, it worked. I must have been blind.
I am passing a string to a user code action that transforms the string and returns it. This returned string is then used as a new variable within the module.
Is there a way to bind this variable?
I totally agree, but how can this be done correctly in my case?
I am passing a string to a user code action that transforms the string and returns it. This returned string is then used as a new variable within the module.
Is there a way to bind this variable?
Re: Warning message "Variables not bound"
I bind this type of variables to parameters in the test case or one of its smart folders. As a convention, I start the parameter name with an underscore to indicate that it receives its value from an action such as a user code call. This also allows to reuse the returned value later. For example, I query the number of files in a directory via user code when the test starts, and can use this value for verification when the test ends.
Are you aware that you can bind variables not only to fields from a data source, but also to parameters defined on various levels?
Hans
Are you aware that you can bind variables not only to fields from a data source, but also to parameters defined on various levels?
Hans
Re: Warning message "Variables not bound"
Thank You very much!
This is the advise I was looking for.
Using variables is a topic I still need to dive into a bit.
This is the advise I was looking for.
Using variables is a topic I still need to dive into a bit.