ruby-jmeter
ruby-jmeter copied to clipboard
How can I create a property?
I am attempting to create a property to use data created in a Setup threadgroup in subsequent threadgroups.
How can I set a property similar to ${__setProperty(threads,10,)}?
Apologies if I missed this in documentation somewhere.
I would suggest building a scenario using the following classes. Both of them pretend to create User Define element in JMeter JMX tree.
https://github.com/flood-io/ruby-jmeter/blob/91d3cad535ac95930c3698e844647f744caa58b6/lib/ruby-jmeter/dsl/user_defined_variables.rb
https://github.com/flood-io/ruby-jmeter/blob/91d3cad535ac95930c3698e844647f744caa58b6/lib/ruby-jmeter/dsl/test_plan.rb
@dadamschi you struggle to try, I may try to build one sample for you, just ping me back if it is still needed
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="startDateYear" elementType="Argument">
<stringProp name="Argument.name">startDateYear</stringProp>
<stringProp name="Argument.value">${__P(startDateYear,2016-12-01)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
expected should look like previous message