I want to run a load test on my server. I have built couple of different test plans and I need to execute all the test plans at the same time.
I'm using a few instances of JMeter on three different machines and I'm trying to figure out whether I can schedule my JMeter scripts to be started at a certain time?
One way would be to run, on each of my machines, a script in which I run my JMeter test plans at a certain time
The reason I decided to not use JMeter in master/slave mode is that each of my test plans would generate a load from different parts of my application. So I need each of my JMeter instances to run a different Thread Group.
If you don't want to install software as Jenkins
You can schedule jmeter execution in exact time using crontab, example:
Schedule a cron to execute at 2am daily.
This will be useful for scheduling database backup on a daily basis.
0 2 * * * /bin/sh backup.sh
Depending on your operating system:
Windows: Task Scheduler
Linux: crontab
MacOS: launchd
You can also consider installing a CI/CD solution like Jenkins, BuiltBot or CruiseControl which provide VCS system integration as well as possibility to schedule builds at the specific time or run basing on various triggers.
a solution to my question is to use "at" command which allows us to schedule a job at a certain time. Since I needed my test script to be executed only once, I decided to take this approach.
For example, following command would schedule a task at 12:01 PM (you need to make sure that your user is assigned all the required permissions to run this job)
echo "JMETER_HOME/jmeter -n -t MT_TEST_PLAN.jmx -l MY_TEST_RESULT.jtl" | at 12:01 PM
Although, I do not support the usage of Jmeter GUI for executing load tests, it depends with how many users you are executing. If the user load is small, you can use Start Time/End Time in the Threadgroup.
If you are using windows machines to execute load test, you can use windows task scheduler to run load tests at some specific time.
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
I have two scenarios, scenario 1 should run at 5:00 PM everyday. Gather the DB results from it and save it on yaml file. I have to use these results to run scenario 2 which needs to be run next day at 8AM. How can I implement this on Jenkins.
Write now I am trying to implement through rake task. My logic is if the yaml file is present run scenario 2 or else run scenario 1.
Is there a better way to do it?
I need these two scenarios on the same jenkins job.
I have almost 50 freestyle Jenkins builds that run as many performance centre tests everyday morning and evening. Currently I am getting status of these individual runs on email but would like to consolidate the results in one e-mail. Now problem with this is output of Jenkins build is always pass when it is able to run pc tests. To find actual result I need to see the artifact that contains HTML result. Is there a way I can read these individual HTML output and group them in one report. Like
Dev test prod
Test1 pass fails pass
Test2 fail pass pass
Test3 pass pass pass
I have little programming or scripting exp so pls forgive me for not using much resources on my own
You may use build result trigger plugin to monitor as many jobs required. For consolidating use tutorial HTML Agility Pack
How can I do create SLA goals and validate SLAs using Jmeter from command line ? Please help, I want to be able to throw this command line script on Jenkins and fail/pas the build based on SLA validation, if SLA goals aren't met the build should just fail.
If you are using Jenkins Performance Plugin - you have the handful of options to mark the build as failed or unstable basing on response times.
If you need to fail the script based on other metrics, the easiest option is running JMeter via Taurus framework. It has flexible and powerful Pass/Fail Criteria subsystem and in case of test failure you will have non-zero command-line process exit code so Jenkins will automatically mark the step as failed.