结果文件在D:src etty_websocket argetjmeter-reports google_search*.xml
1.6 生成html报告(可选)
参考http://jlorenzen.blogspot.com/2008/03/a
Automated Performance Tests using JMeter and Maven
· Under your project create the directory:src/test/jmeterandsrc/test/resources
· Copy thejmeter.propertiesfile from the JMeterbinfolder tosrc/test/jmeter.
· Update the propertyjmeter.save.saveservice.output_formatin thejmeter.propertiesfile from csv to xml.
· Copy the filesjmeter-results-detail-report_21.xslandjmeter-results-report_21.xslfrom the JMeterextrasfolder tosrc/test/resources
. pom.xml add
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0-beta-2</version>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/jmeter-reports</dir>
<stylesheet>src/test/resources/jmeter-results-detail-report_21.xsl</stylesheet>
<outputDir>${project.build.directory}/site/jmeter-results</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>html</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
</plugin>
<>
1.1 部署hudson插件以及配置
参考:http://www.theserverlabs.com/blog/2009/04/23/performance-tests-with-jmeter-maven-and-hudson/
下载http://wiki.hudson-ci.org/display/HUDSON/Performance+Plugin插件,取代jmeter插件。
配置好maven目标,在post-build处,勾选:
Archive the artifacts: jmeter-result/*.html 。这里是发布html格式报告。
Publish performance test result report: google_search*.xml。这里将解析jmeter原始的xml响应数据。