您的位置:软件测试 > 开源软件测试 > 开源配置管理工具 > HUDSON
应用maven/hudson实施jmeter性能自动化
作者:网络转载 发布时间:[ 2014/1/15 10:23:24 ] 推荐标签:hudson jmeter 性能测试 maven

结果文件在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响应数据。

上一页1234下一页
软件测试工具 | 联系我们 | 投诉建议 | 诚聘英才 | 申请使用列表 | 网站地图
沪ICP备07036474 2003-2017 版权所有 上海泽众软件科技有限公司 Shanghai ZeZhong Software Co.,Ltd