jmeter automatic timing script execution

jmeter performed automatically, in the upcoming jmeter automation interface periodically to perform. General on automatically, can be considered jenkins, jenkins periodically build, generate html reports, easy to use. This paper will adopt another approach, .jmx .bat files timing of execution achieved by script.

1. Mr. Cheng .jmx interface test scripts, where much repeat (that is, save the file to ~)

2. Create .bat, timed to call jmeter.bat to perform the task

Specific .bat follows:

@echo off
md D:\test\jtl\
md D:\test\html_report
for /l %%i in (1,1,10) do (jmeter -n -t api_d010sp01.jmx -l D:\test\jtl\%%i.jtl -e -o D:\test\html_report\HTML_Report%%i
ping 127.0.01 -n 5)
pause

This is a relatively simple script, create two directories, a directory for .jtl file, a directory for html report, then each execution .jmx, performed once every 5s, for a total loop executed 10 times.

FIG execution results are as follows:

 

 

Is not very good, a .bat script can replace jenkins up. (In fact, jenkins or a good use)

 

 

expand:

1.jmeter recommended to use non-gui interface

2. Use jmeter in linux and windows, like, unzip unzip, chmod give permission, check the jdk environment variable, you can start to run the script

Guess you like

Origin www.cnblogs.com/jinziguang/p/11649132.html