• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mlex/jmeter-maven-example: Example how to integrate jmeter tests in a maven buil ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mlex/jmeter-maven-example

开源软件地址(OpenSource Url):

https://github.com/mlex/jmeter-maven-example

开源编程语言(OpenSource Language):

Shell 59.5%

开源软件介绍(OpenSource Introduction):

JMeter Maven Example

Example how to integrate jmeter tests in a maven build and how to automatically generate graphs from the test results using the jmeter plugins CMDRunner.

The jmeter tests can easily be used as part of a jenkins-job. See https://mlex.ci.cloudbees.com/job/jmeter-maven-example/. The repository also contains a docker-image of a preconfigured jenkins.

This example was created to accompany a blog post: https://blog.codecentric.de/2013/12/jmeter-tests-mit-maven-und-jenkins-automatisieren/

The jmeter-maven-plugin is used to integrate jmeter in the maven build. To generate graphs from the jmeter results, the jmeter-graph-maven-plugin is used.

Jenkins

Under docker/jenkins can find a jenkins with a preconfigured build-job that runs the jmeter tests and archives the results. Just build the docker image with

cd docker/jenkins
docker build -t jmeter-jenkins .

and run the container with

docker run -p=8080:8080 jmeter-jenkins

and you can access the jenkins in your browser via http://localhost:8080/jenkins/.

Quickstart

Just execute

mvn -Pembedded-jetty verify

This will

  • start an embedded jetty server wit a small webapp,
  • run jmeter tests (just some http requests) against this webserver and
  • create some nice graphs of the result (you will find them in target/jmeter/results).

JMeter GUI

To start the JMeter GUI, use the jmeter:gui goal. The tests are located in /src/test/jmeter. If you start the tests, make sure that the example webapp is running. You can start the webapp explicitly with jetty:run.

JMeter Headless

To just execute the jmeter-tests from commandline (without gui, without embedded webapp, without graph-generation), use the jmeter:jmeter goal. The tests expect a running example webapp, so make sure at http://localhost:9097/. The results of the test-run can be found in /target/jmeter/results. If you want graph-generation, run mvn verify (without the "local" profile).

Configuration

The following maven-properties are available (to set them from commandline, simply add -Dproperty=value)

Property Default
jetty.port 9097
performancetest.webservice.host localhost
performancetest.webservice.port ${jetty.port}
performancetest.webservice.path /
performancetest.connectTimeout 1000
performancetest.responseTimeout 3000
performancetest.threadCount 20
performancetest.loopCount 10



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap