简体   繁体   中英

java.lang.nullpointer exception in jmeter in Non-GUI mode

When i try to execute my Jmeter (version 5.3) recorded script in Non-GUI mode, using a remote server, it displays a "java.lang.NullPointerException" while generating the dashboard(HTML) report. Also, my CSV file (or jtl report) is creating an empty file without any data.

I have used loop controller to call my http request. I have added sample variables to my jmeter.properties file so that they can be recorded. Also, I have set "jmeter.save.saveservice.output_format=csv" in properties file.

在此处输入图像描述

The summarizer shows 0 and it shows error in generating report: java.lang.nullpointerexception.

Also, my log file shows the following: 在此处输入图像描述

Please let me know if there is any possible way to overcome this issue. Thanks in advance!

You're getting this error because you're trying to generate HTML reporting dashboard from an empty .jtl results file

In its turn the.jtl results file is empty because no Samplers were executed

And finally no samplers were executed because all your Thread Groups are disabled

在此处输入图像描述

  1. Open your.jmx script in JMeter GUI

  2. Right click each Thread Group

  3. Choose "Enable" from the context menu

  4. Save the test plan

    在此处输入图像描述

If for some reason you cannot open JMeter GUI just change this line(s) in the.jmx file:

<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="false">

to

<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">

with your favourite text editor or use Taurus tool which can change any property of any element in the runtime

I re-installed jmeter and the same script worked well for me. Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM