Wednesday, February 3, 2010

Tip #5: How to run a test plan for a certain amount of time

If you want to run your Test Plan for a certain amount of time instead of a certain amount of iterations you can do it in two ways:
  • by specifiing testing duration on the Thread Group GUI (Scheduler checkbox must be checked). Note that you must specify the value of Startup delay option as zero otherwise you will need to specify Start Time option value before each test running. And of course you need to check Forever checkbox of Loop Count option. There is 10 minutes test example on the screenshot below.

  • by creating extra Thread Group with two Test Action samplers. The first Test Action configured as pause, and the seconf one is configured to stop all treads. Look at the screenshots below for 10 minutes test example.







    10 comments:

    1. very, very nice. I will use it.

      ReplyDelete
    2. thats great but do we have an option to schedule the jmeter.
      for example start the test plan pause it for few minutes and then again start it,without manually starting it

      ReplyDelete
    3. That can be done by scripts. I prefer 'rake' for this.

      ReplyDelete
    4. Thanks a lot for the tip,
      can you guide me further about the "rake",sorry i am just a starter in jmeter

      ReplyDelete
    5. i want to schedule jmeter like that it should run test thread automatically after every 1 or 2 hrs

      ReplyDelete
    6. Anonymous,
      you can do it using cron.

      ReplyDelete
    7. i m new in testing.can u give brief description about cron.can we do using jmeter or selenium

      ReplyDelete
    8. Nice Article....

      ReplyDelete
    9. Without your help I can't complete my test plan. You explained properties and variables in good way and easy to understand. Thanks

      ReplyDelete