我想使用JMeter在特定时间安排任务

时间:2016-02-03 11:28:10

标签: jmeter automated-tests

我想安排JMeter,以便每隔1或2小时自动运行一个测试线程。

2 个答案:

答案 0 :(得分:3)

至少有两个选项:

  1. JMeter测试可以在command-line non-GUI mode中运行,如:

    jmeter -n -t /path/to/testplan.jmx -l /path/to/results.jtl
    

    如果你把上面的行放到shell脚本文件中应该能够使用你的操作系统调度机制来运行它:

  2. 您可以在Thread Group级别将循环计数设置为“永远”,并将Constant Timer置于测试迭代之间的所需时间内。

答案 1 :(得分:2)

您可以借助Windows任务计划程序

安排测试
1. Create a batch file write below code,do required modification  
  

d:
  cd Software \ apache-jmeter-2.13 \ apache-jmeter-2.13 \ bin
  jmeter -n -t D:\ test.jmx -l D:\ results.jtl

2.open Task Scheduler, create a task, add the batch file path and schedule
  your task on the base your requirement

enter image description here

希望这对你有所帮助