打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
JMeterMavenPlugin

This is a Maven 2 plugin that allows you to run JMeter tests as part of the build. I am using this with

JChav and
Continuum
to automate the running of a suite of JMeter load tests, and publishthe results to a web page. Sorry this is not more polished. It coulduse some TLC to make it more user-friendly to actually plug it into aproject. I just thought I‘d stick the code out there as quickly aspossible and see if anyone is interested in it before I went anyfurther with it.

To build and use the plugin:

  • Create a local Maven repository, if you don‘t already have one.

  • Drop in the attached JMeter jar and POM. You do not need to have JMeter separately installed.

  • Add the jar files that are referenced in the JMeter POM to your local repository, if they are not on ibiblio.

  • Download the attached Maven JMeter Plugin source tarball. Untar it.

  • Run "mvn install" to build and install the plugin.

  • In your project‘s pom.xml, add a dependency on this plugin:

    <dependency>    <groupId>org.apache.jmeter</groupId>    <artifactId>maven-jmeter-plugin</artifactId>    <version>1.0-SNAPSHOT</version>    <type>plugin</type>    </dependency>
  • Create a src/test/jmeter directory, and place your JMeter load tests there.

  • Create a jmeter.properties file in src/test/jmeter. It‘s fine to just copy the default properties file from the JMeter install if you want.

  • Optionally configure includes and excludes in your pom.xml for which tests to run. If you don‘t, it will just run **/*.jmx. For example:

      <build>    <plugins>    <plugin>    <groupId>org.apache.jmeter</groupId>    <artifactId>maven-jmeter-plugin</artifactId>    <configuration>    <includes>    <include>myTest1.jmx</include>    <include>myTest2jmx</include>    </includes>    </configuration>    </plugin>    </plugins>    </build> 
  • Run "mvn org.apache.jmeter:maven-jmeter-plugin:jmeter" to run the tests.

-- Tim McCune

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Jenkins中集成jmeter
Myeclipse搭建Maven开发环境
Maven入门教程(一)
使用Maven 2创建WebLogic Portal应用程序
maven集成eclipse android项目办法总结
Maven 那点事儿
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服