Page 1 of 1

Suppress warnings for variable binding

Posted: Thu Jul 18, 2013 9:48 am
by reiniuny
Can sb. tell me how to suppress the warning "The following module variables are not bound to a data column: [...]"?

As I've inherited my test case classes from a base (tools) class which uses some variables from repository, I get this warning for all test cases because not all repository variables are being used.

Re: Suppress warnings for variable binding

Posted: Thu Jul 18, 2013 1:07 pm
by krstcs
There is no way to suppress that warning.

You will either need to remove the variables or bind them to a data source.

You could create a dummy global parameter and bind them to that.

Re: Suppress warnings for variable binding

Posted: Thu Jul 18, 2013 1:11 pm
by reiniuny
Hmm, that's extremly circumstantial. I'd have to bind the dummy global parameter in each testcase. If I create at some time a new parameter which I'm using in the tools class I would have to change the data binding for each testcase...

Maybe I didn't show my intention correctly - I just want to suppress the warning from the report. Maybe for there is an option for that.

Re: Suppress warnings for variable binding

Posted: Thu Jul 18, 2013 1:28 pm
by krstcs
As I said, there is no option to suppress the warning for unbound variables.

At this point, you have only the two options I suggested.


If you are using a generic base class for all your tests then you probably should not have test variables in that base class anyway, that is poor design and violates one of the primary principles of object-oriented design. You should have generic string parameters only.

Your inherited class should not contain test variables, only the derived class should.

Re: Suppress warnings for variable binding

Posted: Fri Jul 19, 2013 1:03 pm
by Support Team
Hello,

Currently, it's not possible to suppress such warnings for unbound variables.
We will implement a setting for it in our next minor release version (4.1.0).

Regards,
Markus (T)

Re: Suppress warnings for variable binding

Posted: Mon Jul 22, 2013 5:47 am
by reiniuny
That is good news for me, thank you :D

Re: Suppress warnings for variable binding

Posted: Tue Oct 08, 2013 9:13 am
by Nicklas
Hi, we're trying to find the option to suppress the warnings for variable binding. Could you please pin point where the option is? Thank you.

Re: Suppress warnings for variable binding

Posted: Tue Oct 08, 2013 9:36 am
by fimo420
Hi

If you right click on the testcase->properties then you'll find a checkbox(warn for unbound variables).

Re: Suppress warnings for variable binding

Posted: Tue Oct 08, 2013 10:25 am
by Nicklas
Thank you! :D

Re: Suppress warnings for variable binding

Posted: Fri Dec 06, 2013 10:53 am
by Samuel
It´s good, that those warnings can be disabled, however I want to note, that there´s still room for impovement.

For example: I have User Code modules that use multiple variables. Inside those modules the bound variables are used to define certain behaviours of the module itself. Usually some variables have to be set, while most of them dont have to be bound, because they will simply trigger the standard behaviour when no specific value has been passed in (saves the tester the burden to specify bindings for all of the unused values over and over again).

Inside the TestSuite there´s now room for 2 improvements.

1) It´s only possible to disable warnings for all modules and not for specific ones, so if I use just one module with optional parameters I have to turn off warnings for all bindings of all Modules inside the Test-Case, or I have to use extra Test Cases for all of those modules which is not really pretty. Therefore it would be usefull if the Test-Case warnings option could be overwritten by Module specific settings.

2) When defining the binding I have to know which values have to be set and which are optional. It would be usefull if there were a option e.g. inside the "Record Item Argument Editor" where I could set the value to necesarry or optional. Then based on this setting, the necesarry variables could be easily highlighted inside the data binding dialogue and warnings could be supressed if only optional parameters are unbound.

Re: Suppress warnings for variable binding

Posted: Tue Dec 10, 2013 4:18 pm
by Support Team
Hello Samuel,

@1: There is already an entry in our bug tracking system. Unfortunately I don't know when or if this feature will be implemented in Ranorex.
As workaround you can create the module variable in user code and set them as private. If you do this the variable will not be shown in the data binding. The warning in the report will also not be shown for this variable.

@2: There is also already an entry.
As workaround you can also create the module variable in user code and set them private if you don't want don't want it to be bindable in the test suite.

Regards,
Bernhard