您的位置:軟件測(cè)試 > 開(kāi)源軟件測(cè)試 > 開(kāi)源配置管理工具 > HUDSON
應(yīng)用maven/hudson實(shí)施jmeter性能自動(dòng)化
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2014/1/15 10:23:24 ] 推薦標(biāo)簽:hudson jmeter 性能測(cè)試 maven

結(jié)果文件在D:src etty_websocket argetjmeter-reports google_search*.xml

 
1.6      生成html報(bào)告(可選)

參考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目標(biāo),在post-build處,勾選:

Archive the artifacts: jmeter-result/*.html 。這里是發(fā)布html格式報(bào)告。

Publish performance test result report: google_search*.xml。這里將解析jmeter原始的xml響應(yīng)數(shù)據(jù)。

上一頁(yè)1234下一頁(yè)
軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠(chéng)聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd