I am running Jmeter from jenkins pipeline . My Jmx file has 'Simple data Writer' as listener which I want to enable or disable based on the parameters from jenkins . It is possible to enable / disable the listener with right click but i could not find any means to do the same thing programmatically
how to enable or disable a particular sampler or listener with command line options in jmeter
69 Views Asked by UDAY KUMAR At
2
There are 2 best solutions below
0
On
JMeter .jmx test scripts are basically XML files so you can change the parameter using sed editor before running the test:
sed -i '/<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">/ s/enabled="true"/enabled="false"/' /path/to/your/test.jmx
Alternatively you can consider using Taurus tool, it has ability to run existing JMeter tests and change any parameter you can think of on the fly. Check out The Complete Taurus Course if you're interested in Taurus framework

If I understand your question correctly, you should use this command:
By using this command, you can enable or disable specific sampler or listener in JMeter.