Jmeter + Jenkins Performace plugin - jmeter

I have set thread properties as
${__P(threads,)}
for Number of user and
${__P(rampup,)}
for rampup period in jmeter GUI.
Then created a job in jenkins, chosen 'This project is parameterized' and included String parameter 'THREADS' & 'RAMPUP'. I have mentioned the right path for the execution, included -Jthreads=%THREADS% and -Jrampup=%RAMPUP% under Execute Windows batch command.
The right path was set for generating the performance report.
After choosing 'Build with parameters', assume the 'THREADS' as 10 and 'RAMPUP' as 0, the build is successful.
The issue is with the 'Performance report' as every time the 'HTTP Request' count is displayed as 20 by default irrespective of whatever value is provided at the time of build. The thread count of 10 is not being considered as a parameter. By default the HTTP Request count shows as '20' requests instead of the actual '10' requests in reports.

Performance Plugin doesn't know anything about Jenkins parameters, most probably you configured it badly so it consumes the same .jtl results file all the time and doesn't load any updates.
Further assistance is not possible without seeing the screenshot of the freestyle project or the code of your Jenkins JMeter pipeline.

Related

Cannot see all results in Jmeter results tree and report

I'm facing a weird situation with Jmeter 5.4.1
When running a suite, in my results tree all I can see are the results from first 7 (of 30) tests, and in the report, 20 of 30 tests.
All calls are simple and have just a status code and body response assert, and nothing more.
Anyone aware about this issue?
I don't think it's "weird", it's "by design".
By default JMeter stores/shows 500 last results in the View Results Tree listener
If you want to remove this limitation you can add the next line to user.properties file:
view.results.tree.max_results=0
JMeter restart will be required to pick the property up. Then you will be able to see all the results (given they will fit into memory)
More information:
Configuring JMeter
Apache JMeter Properties Customization Guide

Scheduler execution gets over/stopped before specified time

We are running Jmeter scripts in Scheduler mode for 1 hour (Master - 4 Slave machines), however the execution gets over/stopped before 1 hour time (ex: it stops in 40 mints).
Below is the setup: Jmeter version 5.1
Thread Group: Scheduler checked with Duration 1 hour, Forever is selected.
CSV config: Recycle EOF is set to True, Stop thread on EOF is set to False. The CSV is having 20 rows and these rows data has been used/fetched multiple times during 40 mints.
--HTTP Sampler
Tried multiple times with different duration, still the same issue. No errors logged in jmeter.log file.
Referred below resource as well:
JMeter ignore Duration time when using Scheduler
Please suggest to make it to work for complete specified duration.
Unfortunately we're not telepathic enough to guess what's wrong without seeing jmeter.log file from the master machine and jmeter-server.log files from the slaves, the answer should be either in these or in the .jtl results file.
Your test configuration looks very good, just check 3 points:
make sure that the OS time is synchronised on all the slaves and the master
Copy your CSV file to all the slaves
None of Stop Thread/Stop Test/Stop Test Now radiobuttons in the Thread Group are checked
Also be informed that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so consider upgrading to JMeter 5.2.1 (or whatever is the latest stable JMeter version available at JMeter Downloads page) on next available opportunity as it might be the case you're suffering from a form of a bug which has been already fixed.

Jmeter 'View Results In Table' logging only partial requests

I am running a test on Jmeter (Version 4.0) using Throughput Shaping Timer in order to achieve constant rate of hits per second.
I am logging all the data of 'view Results in table' to a file and using it to track all the requests.
The functionality of my application is such that When jmeter hits API , it creates a database entry for each of the hit.
After test execution is finished, I can see that number of results in log of 'View Results in Table' is less than the number of database entries created by jmeter test run. Also, I am able to arrive at the requests which are not present in logs, but are present in database.
Does 'View Results in Table' not save all the requests ? How can this be changes to obtain data of all the requests ?
As per View Results Tree listener documentation:
Starting with version 3.2 the number of entries in the View is restricted to the value of the property view.results.tree.max_results which defaults to 500 entries. The old behaviour can be restored by setting the property to 0. Beware, that this might consume a lot of memory.
You can disable the limitation by adding the next line to user.properties file:
view.results.tree.max_results=0
JMeter restart will be required to pick the property up.
Be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.1 (or whatever is the latest version at JMeter Downloads page) as soon as possible

How I can set up Jmeter to give me daily results

I've started using Jmeter to run daily performance tests, and have also just figured out how to produce an HTML dashboard.
What I need to do now is find a way to run Jmeter every day, producing an HMTL dashboard of the results, but with comparisons of the results of the last few days. This would mean adding to the data of existing files instead of creating a new HTML dashboard every day.
Can anyone help me with this?
The easiest solution is adding your JMeter test under Jenkins control.
Jenkins provides:
Flexible mechanism of scheduling a job
There is a Performance Plugin for Jenkins which automatically analyses current and previous builds and displays performance trend chart on JMeter Dashboard
Alternatively you can schedule JMeter runs using i.e. Windows Task Scheduler and compare the current run with the previous one using Merge Results plugin

Can JMeter Assert on Throughput?

Is it possible to have a Maven/Jenkins build fail due to JMeter tests failing to achieve a specified throughput?
I'm tinkering with the jmeter-maven-plugin in order to do some basic performance tests as part of a continuous integration process in Jenkins.
One can set a Duration Assertion on a Sampler in the JMeter test to mark the sample as failed if a response time is over a certain threshold. What I'd like is to be able to fail a build (in Maven, or in the Jenkins job that triggers the Maven build) based on the total throughput for a test.
Is this possible with any existing plugins?
Yes its possible. You can use the Jenkins Text Finder plugin and the JMeter "aggregate report". With aggregate report you can write a CSV or XML file. You can search this file for your throughput with the Jenkins Text Finder Plugin and then you can mark the build as failed or unstable. Alternativly, you can use a BASH script to search the generated JMeter report file and return a non null return value. This will make your build fail.

Resources