Git Product home page Git Product logo

jmeter-maven-example's 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

jmeter-maven-example's People

Contributors

mlex avatar

Watchers

DrCooper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.