I'm making an HTTP Request where a component of the path is dynamic, resulting in unique Sample Results.
For example:
example.com/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?
解决方案
You can use a JSR223 PostProcessor with following code:
String oldLabel = prev.getSampleLabel();
if(oldLabel.startsWith("example.com/")) {
prev.setSampleLabel("MyUniqueSample");
}
And scope it this way: