Parameter in a variable were not solved


#1

I don’t know if it is a bug or a problem in my script, but I think something is wrong.
I use parameter on the modules to transfer values. If I use a variable in on of this modules and refer to the parameter, the parameter is not known by the script developer.
See Screenshot:

The parameter is “search_term” which is defined in the green box. It is used in all modules below.
In the red box I have a variable, which is defined in the test data on the single module.
I would imagine that the parameter is solved in the variable text.

Why is the parameter not solved? What do I wrong?
Thanks for help.


#2

Hi Ronny,

This is not a bug but a mis-use of module parameters and test data because test data expression must not contain module parameter expressions since they are only valid in the body of the module that defines the parameter.

To get a better understanding of how variable resolution works, you might use the following rule of thumb:

  1. First, each expression of the form @{param} is replaced with the value you pass on the module include command.
  2. Then, each ${varName} expression resolved by traversing the internal scope chain as described here whereas variables defined by store* commands are always on top of this chain.

Thanks,
Hartmut