為什么需要執(zhí)行項(xiàng)目?因?yàn)樽詣?dòng)化忧风。Jenkins平臺(tái)配置GIT/SVN項(xiàng)目即可實(shí)現(xiàn)自動(dòng)化部署默色。
如下圖所示,最上方的大模塊就是執(zhí)行項(xiàng)目狮腿,包含JMX文件組(JMeter執(zhí)行的業(yè)務(wù)配置)和POM文件(配置觸發(fā)JMeter MAVEN命令行生成項(xiàng)目)腿宰。其中,桔黃色PLUGIN項(xiàng)目即為(二)中的PLUGIN項(xiàng)目缘厢。
于是吃度,執(zhí)行項(xiàng)目的內(nèi)部結(jié)構(gòu)也很清晰,主要是JMX文件和POM配置贴硫。
其中椿每,JMX文件可以根據(jù)(二)的測(cè)試流程,通過(guò)GUI來(lái)生成英遭。POM配置文件根據(jù)(一)中官方的配置引導(dǎo)來(lái)觸發(fā)间护。
下方是POM中的BUILD配置參考:
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.8.0</version>
<configuration>
<suppressJMeterOutput>false</suppressJMeterOutput>
<testFilesIncluded>
<testFilesIncluded>**/*.jmx</testFilesIncluded>
</testFilesIncluded>
<generateReports>true</generateReports>
</configuration>
<executions>
<execution>
<id>performance test</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
本文介紹了JMeter執(zhí)行項(xiàng)目在體系中的位置,并給出了POM文件的配置參考信息贪绘。