jmeter
jmeter copied to clipboard
How to save custom properties in a TestElement
The documentation URL
https://jmeter.apache.org/api/org/apache/jmeter/testelement/AbstractTestElement.html#setProperty(java.lang.String,int)
Feedback
I created a TreeModelListener with the purpose of adding a new property when a node is created. In it, I used element.setProperty(new StringProperty(PROP_STABLE_ID, newId)). It works for some components — I can see the property <stringProp name="stable.id">cb5c157c-bf62</stringProp> in the JMX file. However, for components like Transaction Controller and HTTP Request, the property is not successfully saved. How can I achieve this?
The test plan tree with the successfully saved properties: