You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including a config containing a scenario that uses a variable in a request url that is defined in the included config itself, the url gets an extra "http:/" prefix that is not defined anywhere.
There are two .yml files, main.yml and module-with-variables.yml. main.yml includes module-with-variables.yml via included-configs. module-with-variables.yml defines a scenario that uses a variable in the request url like url: ${url}/login. The variable is defined in module-with-variables.yml as well. When running the test, the variable is not resolved and the list of requests contains | ${url}/login | FAIL | 0.00% | 0.000 | Non HTTP response message: Illegal character in path at index 7: http:/${url}/login
Defining the variable in main.yml fixes this issue, but since the variable is not used anywhere else outside of the included config, I'd like to keep it in the included config itself. The use-case I'm trying to implement is extracting the login to my system under test into a separate .yml file in order to reuse it for multiple scenarios.
Expected behaviour
Variables in included configs that are defined in the included config itself should be replaced as usual. The way I read the documentation on included-configs (https://gettaurus.org/docs/ConfigSyntax/#Included-Configs) it sounds like the included configs should be merged into the file including them and after that be processed as usual. So the variables should work as if they were defined in a single file.
Observed behaviour
When including a config containing a scenario that uses a variable in a request url that is defined in the included config itself, the url gets an extra "http:/" prefix that is not defined anywhere.
There are two .yml files,
main.yml
andmodule-with-variables.yml
.main.yml
includesmodule-with-variables.yml
viaincluded-configs
.module-with-variables.yml
defines a scenario that uses a variable in the request url likeurl: ${url}/login
. The variable is defined inmodule-with-variables.yml
as well. When running the test, the variable is not resolved and the list of requests contains| ${url}/login | FAIL | 0.00% | 0.000 | Non HTTP response message: Illegal character in path at index 7: http:/${url}/login
Defining the variable in
main.yml
fixes this issue, but since the variable is not used anywhere else outside of the included config, I'd like to keep it in the included config itself. The use-case I'm trying to implement is extracting the login to my system under test into a separate .yml file in order to reuse it for multiple scenarios.Expected behaviour
Variables in included configs that are defined in the included config itself should be replaced as usual. The way I read the documentation on
included-configs
(https://gettaurus.org/docs/ConfigSyntax/#Included-Configs) it sounds like the included configs should be merged into the file including them and after that be processed as usual. So the variables should work as if they were defined in a single file.Steps to reproduce
main.yml
:module-with-variables.yml
:bzt ./main.yml
http:/${url}/login
, so the${url}
variable is not replaced and an extrahttp:/
appears.Affected Taurus version
.bzt-rc
only contains commented out settings.The text was updated successfully, but these errors were encountered: