-1

I have a transaction controller and in that 5 requests are there. Now when i run a load test and in my script "Generate parent sampler" is checked. So here what is happening is whenever a failure occurs in any of the requests within this sampler, the transaction controller shows a message like "None" or "Number of sampler" etc.

I am using Grafana to monitor my test results, so how can i show the failed response message of a failed request to a transaction controller first and then show the message in grafana

bbb
  • 149
  • 2
  • 18

1 Answers1

0

JMeter's Backend Listener doesn't send response message to Grafana, you can see the possible values in the Metrics Exposed chapter.

The only way to send the response message to Grafana is changing Transaction Controller label using JSR223 Test Elements and Groovy language.

Example code for the JSR223 Sampler:

SampleResult.setIgnore()

def failure = prev.getParent().getSubResults().find { subResullt -> !subResullt.isSuccessful() }

if (failure != null) {
    failure.getParent().setSampleLabel(failure.getParent().getSampleLabel() + ': ' + failure.getResponseMessage())
}

Demo:

enter image description here

Dmitri T
  • 159,985
  • 5
  • 83
  • 133