Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

How to save custom properties in a TestElement

未关闭
#6,500 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
documentation

调研方向

从链接的 AbstractTestElement#setProperty API 文档和报告中提到的 TreeModelListener 用法开始。比较报告中所列组件(包括 Transaction Controller 和 HTTP Request)的自定义属性是如何持久化的。完成的标准是文档清楚地说明是否可以为这些 TestElements 保存自定义属性,以及如何保存。

由索引模型根据 Issue 内容生成。

描述

documentation to-triage
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 cb5c157c-bf62 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

主要语言
Java
星标
9.6k
派生
2.3k
平均合并
20 小时 42 分钟
30 天内合并 PR
10

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/jmeter 的其他 Issue

查看 apache/jmeter 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。