[Feature] Add sampleType to SampleResult
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
调研方向
首先阅读 SampleResult API 和 TransactionController.isFromTransactionController 入口点,然后跟踪 listener、后端 listener、plugin 以及其他消费者如何识别结果类型。当 SampleResult 暴露一个明确的 SAMPLE 或 TRANSACTION 类型,并且在 Transaction Controller 的 responseMessage 被自定义时仍然可靠,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Use case
There is currently no explicit/documented field in SampleResult that identifies the type of result, such as SAMPLE or TRANSACTION.
The current workaround is to use:
TransactionController.isFromTransactionController(sampleResult)
However, this approach is fragile because transaction detection depends on other SampleResult fields. In particular, it can break when a user redefines the responseMessage of the Transaction Controller with a custom value.
This behavior is also not documented, so users have no way to know that redefining the Transaction Controller's responseMessage can silently break transaction detection.
Possible solution
Add an explicit sampleType field to SampleResult, for example:
public enum SampleType {
SAMPLE,
TRANSACTION
}
Then consumers could use:
sampleResult.getSampleType() == SampleType.TRANSACTION
This would provide a reliable way for listeners, backend listeners, plugins, and other consumers to identify the type of a SampleResult.
Possible workarounds
No response
JMeter Version
5.6.3
Java Version
java 17.0.7
OS Version
No response
- 主要语言
- Java
- 星标
- 9.6k
- 派生
- 2.3k
- 平均合并
- 18 小时 33 分钟
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/jmeter 的其他 Issue
-
[Bug] Typo in assertion property name: "Asserion.test_strings" missing 't'可能已有人在做 @waterWang 于 48 天前认领。 未关闭defect to-triage
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
enhancement to-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
RandomDate ignores inclusive end date and throws when start == end可能已有人在做 @weillercarvalho 于 325 天前认领。 未关闭defect to-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
documentation to-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
invalid wontfix
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
相似的 Issue
-
[Bug] AI unread message badge counts a batch of new bubbles as one message可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
apache/rocketmq-dashboard#5784 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
PCL-Community/PCL-CE#3658 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Team/Identity Server Core Type/Improvement U2
难度 2/5 1-3 小时 新手友好度 62/100
wso2/product-is#28553 ·
维护者通常 1 天内回复
-
frontend
难度 1/5 1 小时以内 新手友好度 72/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#116 ·
维护者通常 2 天内回复