jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

How to save custom properties in a TestElement

Open hui-huo opened this issue 4 months ago • 0 comments

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: Image

hui-huo avatar Sep 09 '25 06:09 hui-huo