Unable to bind to inherited module variable

Bug reports.
brogdonm
Posts: 4
Joined: Thu Dec 19, 2013 11:39 pm

Unable to bind to inherited module variable

Post by brogdonm » Wed Jan 15, 2014 10:14 pm

I have a base abstract class providing a few module variables and then I have classes that provide the specific implementation for the abstract class. For example:

Code: Select all

namespace Test
{
  public abstract class Base : ITestModule
  {
    [TestVariable("BAC49633-EDF4-4573-8DF1-826705980768")]
    public string Printer
    { get; set; }
  }

  [TestModule("5BFC54EA-9839-4052-BFBB-C267DB9432B7", ModuleType.UserCode, 1)]
  public class A : Base 
  {
    ...
  }
  
}
Then within my Ranorex test suite (rxtst) file, when I go to perform data binding to the module variable, it is not visible from class A. This seems to be a bug or am I doing something completely wrong?

I am using Ranorex Studio v4.0.3

Regards,
Michael

brogdonm
Posts: 4
Joined: Thu Dec 19, 2013 11:39 pm

Re: Unable to bind to inherited module variable

Post by brogdonm » Fri Jan 17, 2014 2:00 pm

I would also like to add, even though I cannot see the module variables for binding, I still get the warnings in my report at the end of runs stating that they are unbound.

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

Re: Unable to bind to inherited module variable

Post by Support Team » Tue Jan 21, 2014 7:25 pm

Hi brogdonm,

Thank you for reporting the issue.
Unfortunately I am not able to reproduce the issue. Maybe I understand something wrong.
Can you please post a small Ranorex Solution and show me what exactly you are doing?
Thank you!

Regards,
Bernhard
.
Image

brogdonm
Posts: 4
Joined: Thu Dec 19, 2013 11:39 pm

Re: Unable to bind to inherited module variable

Post by brogdonm » Wed Jan 22, 2014 4:37 am

Bernhard,

Thanks for the reply. I have put a simple solution together that displays the behavior described. To reproduce, follow these steps:

1. Unzip SampleModuleVariable.zip
2. Step into SampleModuleVariable directory
3. Open SampleModuleVariable.rxsln with Ranorex 4.0.3
4. Double click SampleModuleVariable.rxtst to open
5. Right-click on the main node: "SampleModuleVariable - Test Suite"
6. Click "Global Parameters..."
7. Verify row 1 has a parameter named "Printer", set to "My new printer"
8. Click OK
9. Right-click "HelloWorld"
10. Click "Data Binding..."
11. In the Parameters section, bottom of the dialog, notice SampleModuleVariable.Printer is "(Unbound)" to a Module Variable
12. Click the dropdown for the Module Variable binding

Expected results: Module variable, Printer, would be available for selection

Actual results: Drop down is empty


NOTE: If you actually run the test case from the rxtst file, the report contains a warning about the module variable Printer being unbound.
Attachments
SampleModuleVariable.zip
(5.65 KiB) Downloaded 106 times

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

Re: Unable to bind to inherited module variable

Post by Support Team » Mon Jan 27, 2014 4:21 pm

Hello brogdonm,

Thank you for your Solution.
Unfortunately this is not possible at the moment and I am not sure if this will be possible in the future. I would recommend to use the standard Code Modules in Ranorex instead.

Regards,
Bernhard
.
Image