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

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
Open your .jmx script in JMeter GUI
Right click each Thread Group
Choose "Enable" from the context menu
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!

Related

I have recorded a test plan for Files Upload processs from Blazemeter, still when I try to run it for the second time, get "Bad Request-->400" error

I did as follows:
recorded a test script regarding file upload using Blazemeter.
tried to upload another file, so I replaced a new file with the previous one inside the "Jmeter --> Bin" directory.
Before running the script just changed the filename "Parameter -->vale" like the screenshot:
When I run the scripts, it shows error:
This request doesn't look like a proper one to me, my expectation is that the file should go to "Files Upload" folder of the HTTP Request sampler and Use multipart/form-data box should be checked.
I would rather recommend re-recording it using HTTP(S) Test Script Recorder, just make sure to copy the file you're uploading to JMeter's "bin" folder before executing the file upload request in browser. More information: Recording File Uploads with JMeter

replay failed to start see vugen log for more details - error when replayed vugen

I am using Loadrunner 2020 community edition. I have created a script in TruClient and when trying to replay in develop script mode, getting 'replay failed to start see vugen log for more details' error.
'logfile.log' was empty and 'mdrv.log' file had last replay log details when checked. Are those the files vugen referring to? What is the solution for this?
I faced the same issue, but was able to fix it as follows.
When I compiled the script, I did not see any errors in the output, so I checked the "Output -> Chromium(IE) - Interactive Replay" log which had several errors related to parameter files. When I fixed those, I was able to replay the script.
Output Log Path

TestNg emailable-report is not updating?

When I am running the tesng.xml file by running it by right clicking on it ,the emailable-report.html file is showing as per the latest test result ,but While running it from terminal by "mvn test" test results are coming as per expected but emailable-report.html file is updated as per the current result .
That's because your report is probably generated in target folder when you run it with maven and in test-output when running it via testng.xml directly. So you are probably expecting it to be in different place and you are opening wrong report, while your latest report is in target folder.
I had the same problem, but the folder was ok. The problem is that the emailable-report.html generation occurs after all the execution, including the annotations #After.... What I did is using Reporter.getCurrentTestResult(); in #AfterTest before performing the email send action to have the file updated at the right time.

JMeter Test Results Monitoring/ Analysis

I want to start load testing by running JMeter from command line for more accurate test results, but how can I monitor the run and then analyze the results after the test finishes.
You can generate JTL (JMeter results) file while executing the JMX (JMeter script) file from command line. A sample command for generating JTL file will look like this..
jmeter -n -t path-to-jmeterScript.jmx -l path-to-jtlFile.jtl
After completion of script execution you can open the JMeter GUI and simply open the JTL file in any listener (as per your requirement).
Most of the listeners in JMeter have an option to save the results into a file. This file contains usually not the report itself, but the samples which are generated by the tests. If you define this filename, you can generate the reports using these saved files. For example see http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report .
If you run JMeter in command-line non-GUI mode passing results file name via -l parameter it will output results there. After test finishes you will be able to open the file with the Listener of your choice and perform the analysis.
By default JMeter writes results in chunks, if you need to monitor them in real time add the following line to user.properties file (lives under /bin folder of your JMeter installation)
jmeter.save.saveservice.autoflush=true
You can use other properties which names start with jmeter.save.saveservice.* to control what metrics you need to store. The list with default values can be seen in jmeter.properties file. See Apache JMeter Properties Customization Guide for more information on various JMeter properties types and ways of working with them.
You can also consider running your JMeter test via Taurus tool - it provides some statistics as the test goes either in console mode or via web interface.

Run a project from jetty in intellij with run time info outputted to a file

I have the following scenario:
I run my application in development mode and use jetty as the web server.Maven is used to build the application. Is it possible to output the run time log to a file instead of in the IntelliJ environment ?That is instead of viewing the information in the window with the red arrow pointing towards it I want to display it in a file.
You have a Logs tab in Jetty Server running configuration where you can choose to save console output to a file.