Re: Query regarding injection of a plugin inside jmeter script

Dmitri T <[email protected]> Thu, 29 Aug 2024 08:27:44 +0200
Newsgroups gmane.comp.jakarta.jmeter.user
Message-ID <PH7PR12MB7139FA0C25EC6160B58F024EC0962@PH7PR12MB7139.namprd12.prod.outlook.com>
Priyansh Gupta wrote:
> Hi, I am trying to automate my jmeter runs on aws public cloud. For this
> automation, I need to inject some listeners on the fly for the input jmeter
> script (jmx). I could achieve this easily by modifying the jmx file itself,
> but doing this is always risky and could run into some errors. Hence I
> wanted to know if there is any existing way to tell jmeter to add some
> listeners before executing the script without modifying the actual jmx.
> Basically any tool or any cli (jmeter) option which I can use to achieve
> the same.
>
> Thanks
> Priyansh Gupta
>
If you're talking about built-in JMeter listeners - there is no need to 
have them in the .jmx script, you can always open the.jtl result file 
<https://cwiki.apache.org/confluence/display/jmeter/JtlFiles> with the 
listener of your choice and it will read the file and display aggregate 
info/render charts/etc.

In case you're adding a custom listener you can

  * have it in the .jmx script in the "disabled" state
  * run your JMeter test via Taurus tool
    <https://www.blazemeter.com/university/complete-taurus-course>
  * Taurus has capability of modifying JMeter scripts
    <https://gettaurus.org/docs/JMeter/#Modifications-for-Existing-Scripts>
    so you can enable the listeners in the runtime