2
votes

I've created a Jmeter test plan containing a lot of samplers and a response Assertion for each one , Integrated it successfully with Jenkins

My Question:

Is there a way to configure the performance report to view the number of successful vs failed sampler assertions in the performance report or is there a better plugin for Jenkins to to so

2
In Jenkins, use below command JMETER_HOME\jmeter.bat -J jmeter.save.saveservice.output_format=xml -n -t JMETER_HOME\<testplan>.jmx -l JMETER_HOME\<your-JTL>.jtl. This will execute the test in NON-GUI mode. Once the test is done, launch JMeter and add your choice of listener and map the JTL to view the results. To view the success/failed assertion, add Assertion Listener to see the results. Let me know if this helps.NaveenKumar Namachivayam

2 Answers

2
votes

You should have "Percentage of errors" chart under the "Performance Trend" section:

JMeter Jenkins percentage of erros

Given you add an assertion to each sampler it should be enough to use this chart.


With regards to other options, depending on what you are trying to achieve you can also:

  1. Generate JMeter HTML Reporting Dashboard, it comes with the statistics table. The dashboard can be displayed using i.e. HTML Publisher Plugin
  2. Run JMeter test via JMeter Ant Task as a post processing step it transforms JMeter .jtl results file into single-page HTML report which has statistics and failed assertion details. See Running a JMeter Test via Jenkins Pipeline - A Tutorial for example configuration steps
  3. Run your JMeter test using Taurus tool as a wrapper, it has JUnit XML Reporter subsystem. It produces results which can be parsed by i.e. Jenkins JUnit Plugin
0
votes

After a lot of trials and fails I found out a way to view passed , failed Jmeter Samplers in Jenkins

which is to Extract the result report to a .csv file

I did this by doing the following :

1- Add a View Results Tree listener to my test plan

2- I run the Jmeter in a NON GUI mode within Jenkins by including below command in the post build Action:

sh jmeter.sh -Jjmeter.save.saveservice.output_format=csv -Jjmeter.save.saveservice.timestamp_format=yyyy/MM/dd -n -t /path to the test plan/TestPlan.jmx -l test1.csv

After building the project there will be a performance report displaying all the samplers in my .jmx file with the failed ones colored in Red

Note:

If you want to include the .CSV file in the notification Email aftre the project build you have to choose Which fields to be included in the output report and this is done by pressing Configure in the (Show Results In Tree) listener and choose what fields to be included in the file