合并JMeter SampleResult条目 [英] Consolidate JMeter SampleResult Entries
本文介绍了合并JMeter SampleResult条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在发出一个HTTP请求,其中路径的一部分是动态的,从而产生了唯一的Sample Results.
I'm making an HTTP Request where a component of the path is dynamic, resulting in unique Sample Results.
例如: example.com/UNIQUE_ID
For example: example.com/UNIQUE_ID
UNIQUE_ID将根据每个请求而更改,并创建一个唯一的请求标签,如下图所示:
The UNIQUE_ID will change upon every request and create a unique request label like in the picture below:
是否有一种方法可以将它们合并到一个条目中?
Is there a way to consolidate them under a single entry?
推荐答案
您可以使用 JSR223 PostProcessor ,其代码如下:
You can use a JSR223 PostProcessor with following code:
String oldLabel = prev.getSampleLabel();
if(oldLabel.startsWith("example.com/")) {
prev.setSampleLabel("MyUniqueSample");
}
并范围以这种方式:
这篇关于合并JMeter SampleResult条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文