'Problem passing user defined variables (JMeter Script)
I don't know how to pass User Defined Variables (from JMeter .jmx Script) on jenkins-taurus.yml (Taurus BlazeMeter configuration file). It keeps pushing the fixed variables: [1]: https://i.stack.imgur.com/igIK3.png
I need these fields (User Defined Variables) to be blank, and the info inside them to be pushed from the Taurus configuration file:
As you can see, I'm trying to pass the parameters through Taurus configuration file (.yml) [2]: https://i.stack.imgur.com/kMpRx.png
SI need to know how to pass these variables inside Taurus script,
should I use user.{userDefinedParametersHere}
or is there another kind of syntax?
This is necessary because the server URL and login/password could be changed easily this way.
Solution 1:[1]
You're using incorrect keyword, if you want to populate the User Defined Variables via Taurus you should use variables
, not properties
---
execution:
- scenario:
variables:
foo: bar
baz: qux
script: test.jmx
It will create another instances of User Defined Variables called Variables from Taurus
If you additionally need to disable all existing User Defined Variables instances you could do something like:
---
execution:
- scenario:
variables:
foo: bar
baz: qux
script: test.jmx
#if you want to additionally disable User Defined Variables:
modifications:
disable: # Names of the tree elements to disable
- User Defined Variables
If you have defined your variables at Test Plan level - don't worry, just override them via Taurus and the script will use the "new" values (the ones you supply via variables
keyword)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dmitri T |