This repo has a simple JMeter test plan and a groovy script to integrate JMeter with Dynatrace.
Add a Pre Processor
element to your Thread Group
and copy the DT-JMeter.groovy to the Pre Processor.
- To configure Test Plan name, add
${__TestPlanName}
to theParameters
field in thePre Processor
. - To configure Load Test name, add a variable
LoadTestName
either inTest Plan
orUser Defined Variable
and its value.
Execute the test. Dynatrace headers will be added to each sampler and for each thread.
e.g. X-Dynatrace-Test: SI=JMeter5.4;LSN=Dynatrace-Tagging.jmx;TSN=HTTP Request 1;LTN=No name for Load Test;VU=Thread Group-0;
Tested with Apache JMeter 5.4.2.