Suppress warnings for variable binding

Ranorex Spy, Recorder, and Studio.
reiniuny
Posts: 23
Joined: Thu Jul 04, 2013 10:48 am

Suppress warnings for variable binding

Post by reiniuny » Thu Jul 18, 2013 9:48 am

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Suppress warnings for variable binding

Post by krstcs » Thu Jul 18, 2013 1:07 pm

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.
Shortcuts usually aren't...

reiniuny
Posts: 23
Joined: Thu Jul 04, 2013 10:48 am

Re: Suppress warnings for variable binding

Post by reiniuny » Thu Jul 18, 2013 1:11 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Suppress warnings for variable binding

Post by krstcs » Thu Jul 18, 2013 1:28 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Suppress warnings for variable binding

Post by Support Team » Fri Jul 19, 2013 1:03 pm

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)
.
Image

reiniuny
Posts: 23
Joined: Thu Jul 04, 2013 10:48 am

Re: Suppress warnings for variable binding

Post by reiniuny » Mon Jul 22, 2013 5:47 am

That is good news for me, thank you :D

User avatar
Nicklas
Posts: 20
Joined: Mon Sep 26, 2011 2:53 pm
Location: Sweden

Re: Suppress warnings for variable binding

Post by Nicklas » Tue Oct 08, 2013 9:13 am

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.

fimo420
Posts: 55
Joined: Wed Jun 20, 2012 9:49 am

Re: Suppress warnings for variable binding

Post by fimo420 » Tue Oct 08, 2013 9:36 am

Hi

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

User avatar
Nicklas
Posts: 20
Joined: Mon Sep 26, 2011 2:53 pm
Location: Sweden

Re: Suppress warnings for variable binding

Post by Nicklas » Tue Oct 08, 2013 10:25 am

Thank you! :D

Samuel
Posts: 14
Joined: Tue Nov 12, 2013 10:50 am
Location: Germany (BW)

Re: Suppress warnings for variable binding

Post by Samuel » Fri Dec 06, 2013 10:53 am

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.
Last edited by Samuel on Thu Jan 16, 2014 3:29 pm, edited 1 time in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Suppress warnings for variable binding

Post by Support Team » Tue Dec 10, 2013 4:18 pm

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