1
votes

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.

4
You can use jenkins to define several jmeter test plans schedule at same timeuser7294900
Any other ways which doesn't require any new installation on my VMs?Suo6613

4 Answers

1
votes

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
1
votes

Depending on your operating system:

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.

1
votes

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
0
votes

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.