简体   繁体   中英

“java.lang.NullPointerException” error in JMeter Non-Gui mode

When I try to execute JMeter (Version 5.1.1 & 5.2.1 ) recorded script in Non-Gui mode using distributed testing, It is displaying below shown "java.lang.NullPointerException" error while generating HTML report. Also JTL report is creating an empty notepad file without any data.

.

Note:- This error occurrs only when I place CSV Data Set Config - Config Element in the test plan. When I remove/disable it, HTML and JTL reports get generated without any error. Also I can't skip this CSV Data Set Config plugin on test execution.

.

Please let me know, If there is any other solution to overcome this issue.

Thanks in advance.

在此处输入图片说明

You're highlightling not the cause but rather a consequence, you should be rather paying attention to the Summariser output which states summary = 0

在此处输入图片说明

which basically means that no Samplers were executed so your test script execution on slaves failed somewhere somehow. First of all I would recommend checking jmeter.log on the master and jmeter-server.log files on the remote machines, most probably you will be able to figure out the root cause from there.

Quick checklist:

  1. Make sure to use the same Java version on the master and the slaves
  2. Make sure to use the same JMeter version (better the latest one ) on the master and the slaves
  3. If your test relies on JMeter Plugins - you need to install all the plugins used in the test onto all the slaves
  4. If you define some properties in user.properties file you need to do the same on all the remote machines (or alternatively pass them via -G command-line argument)
  5. If you're using external 3rd-party files (CSV files, files to be uploaded, etc.) - you will need to manually copy them to the slave machines
  6. Double check Remote hosts and RMI configuration to ensure that the slaves can communicate with the master in order to send Sample Results back to it. Also make sure that the relevant ports are open in Windows Firewall

More information: How to Perform Distributed Testing in JMeter

该问题似乎与csv文件路径有关,请确保您在csv-file-config中提供了正确的路径,通常在无法从该位置读取数据时会发生这种情况。

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