Page 1 of 1

Data binding at recording module level

Posted: Tue Aug 12, 2014 12:24 pm
by rastek
Hi,
I have global parameters and recording level parameters for my repositories and recordings.
I bind the variables to global variables by right clicking Data Binding on my recordings.

When I put my recording inside a test case and call test case from the console, everything is ok, parameters are used. But If I call it from directly as a module using the mo: option with the following command

myexe /pa:varClient=john27 /pa:bType=Chrome /mo:Login

it is not working, in the console it gives the following error

The following module variables are not bound to a data column:
varClient, bType

When I right click on Data Binding on my recording , it shows all variables are bound in "Parameters" panel -lower side of Data Binding tab-.

but in same window,variable Binding in-upper side of Data Binding tab- I see that variable binding panel is empty (shows no entry in Data Column and Module Variable columns)

I mean they are realy not bound to a data column (only bound in Parameters panel)
You can see it in ten screenshot I send.

Also I get confused at one point that, as shown in page http://www.ranorex.com/support/user-gui ... dules.html

If there is not a binding for my module-variables, why it is working fine when I call test cases instead of modules from the console ??

How can I succesfuly bind my varibles and call my modules with parameter from the console ? How can I achieve this ?

PS:When I have put it inside any test case and bind variables again, still not working using mo, only works if I call the tc.

I am sending a screenshot for my variales

Thanks.

Re: Binding module Variables to Global Parameters Issue

Posted: Tue Aug 12, 2014 1:40 pm
by rastek
[Moved post to topic due to the similarity - Ranorex Support Team]

Post origin: http://www.ranorex.com/forum/binding-mo ... t2279.html

Hi . Same problem occur in my creash created tests.

I am using last version 5.1.0

And as the other guy who posted the original post, I see from the test suite that my variables are bound.

But I get that same message when ı call from the console using exe file, also regarding my parameters and using default values.

Need help immiadely..
Thanks.

Re: Data binding at recording module level

Posted: Wed Aug 13, 2014 12:26 pm
by Support Team
Hello rastek,

In order to apply the data binding it is necessary to execute the whole test suite, otherwise the variables won’t be bound to the global parameters.
Note: Variable binding (e.g. to a data column) only takes place if the test automation is run from the test suite view. When running modules separately (e.g. "Play" in recorder), variable's default values are used.
--http://www.ranorex.com/support/user-gui ... sting.html
If you still want to access variables from your console even if you are calling a single module I would suggest passing your own arguments to your program. These arguments can be accessed via the “string[] args” within your main method (Program.cs). A documentation on “How to access and handle the command-line arguments” can be found here: http://msdn.microsoft.com/en-us/library/kztbsa4b.aspx

Regards,
Robert