1
votes

I am new using the Apache JMeter, I am currently using JMeter for stress test to load balancer. There are 2 Web Server pointing to the single database server. All the configuration load balancer was successfully configure and work fine. After using the JMeter, i able to create a different scenario, i.e shutdown one of the web server or removing the index file. JMeter also working fine display all the request and result each request either the thread (user) getting 404 or 200. Any idea on how to create and configure so that JMeter will display and count each the result, i.e How many number getting HTTP-response code 404 or 200 ? It possible to generate the result and transform it into the graph using the JMeter ?

Configuration:
Server
-Thread Group (50 Sample)
 -HTTP Request
  -Regular Expression Extractor (disabled)
  -Response Assertion (disabled)
  -View Result Tree
 -Debug Sampler (disabled)
 -Graph Results
 -Summary Report

enter image description here

2

2 Answers

2
votes

You do have the results already

  1. Remove all the listeners from your Test Plan, the listeners don't add any value and just consume valuable resources
  2. Run your JMeter test in command-line non-GUI mode like

    jmeter -n -t test.jmx -l result.csv
    
  3. Open the result.csv file with MS Excel or LibreOffice Calc or equivalent - you will have timeStamp and responseCode columns which will allow you to build some form of "Response code over time" chart

    enter image description here


Another option is using Response Codes per Second chart:

enter image description here

It is not a part of JMeter distribution bundle, it can be installed using JMeter Plugins Manager


And finally you can store the status code of the response into a JMeter Variable using Regular Expression Extractor configured like:

enter image description here

once done you can add the next line to user.properties file:

sample_variables=statusCode

and plot this custom variable to the HTML Reporting Dashboard

1
votes

You can generate JMeter dasboard which include Errors summary:

You can create dashboard using existing log file:

jmeter -g <log file> -o <Path to output folder>