What are the main differences between variables and parameters, in Ranorex tests?
How do we know when to use one and not the other?
Thanks!
Differences between variables and parameters?
Re: Differences between variables and parameters?
It depends a lot on the language you are talking about. Ranorex is built on .NET, so the .NET definitions hold.
Parameters are values passed INTO something, such as a method or the application itself (from the command-line). Parameters define the starting conditions of some functionality.
Variables are areas of memory designated to store variable values (i.e. values that might change) at run-time. Variables usually store values that represent an object or its state in object-oriented languages like .NET.
Variables can be passed into methods as parameters, and parameters passed into methods can be stored into variables.
In Ranorex, global and test-case parameters are treated like global or test-case level variables in many ways. They are sets of values that are generally static at the start of a test but then can be updated during the run in order to pass values between test-cases or modules.
Parameters are values passed INTO something, such as a method or the application itself (from the command-line). Parameters define the starting conditions of some functionality.
Variables are areas of memory designated to store variable values (i.e. values that might change) at run-time. Variables usually store values that represent an object or its state in object-oriented languages like .NET.
Variables can be passed into methods as parameters, and parameters passed into methods can be stored into variables.
In Ranorex, global and test-case parameters are treated like global or test-case level variables in many ways. They are sets of values that are generally static at the start of a test but then can be updated during the run in order to pass values between test-cases or modules.
Shortcuts usually aren't...
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Differences between variables and parameters?
Thanks very much krstcs, your answer is just what I needed. I was asking the question in relation to Ranorex data driven tests.
Re: Differences between variables and parameters?
It was very informative explanation. One can easily understand the difference of parameter and variable relation to Ranorex data driven tests.