mohamed faisal
mohamed faisal

Reputation: 177

How to view Jmeter Assertion results in Jenkins

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

Upvotes: 2

Views: 3151

Answers (2)

mohamed faisal
mohamed faisal

Reputation: 177

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

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168147

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

Upvotes: 2

Related Questions