1. The installation procedure can be found at:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions
2. Check if it is working:
[root@spike ~]# sudo service jenkins startThe logs of Jekins run will be placed at:
Starting Jenkins [ OK ]
/var/log/jenkins/jenkins.logFind something like:
INFO: Jenkins is fully up and running3. Accessing Jekins:
The general information can be found on:
https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins
However, it is necessary to create a tunnel in the port 8080.
ssh -f root@spike -L 8080:127.0.0.1:8080 -NJekins must be available at:
http://127.0.0.1:8080/
JMeter plugins
The Jekins pages recommends using the Performance plugin instead of JMeter plugin.
https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin
- The easiest way to install Jekins is by the Plugin Manager interface: http://127.0.0.1:8080/pluginManager/
- Go in the tab "Available" and find "Performance plugin" (figure below)
- Go in "Download now and install after restart"
- After finish the donwload, restart jekins service: "sudo service jenkins restart"
- Install JMeter
- Download it:
wget http://apache.mirror.iphh.net//jmeter/binaries/apache-jmeter-2.11.tgz - Extract the files to :/var/lib/jenkins
- Rename (mv) apache-jmeter-2.11 as jmeter
- Download it:
- To check if it is installed it is necessary to create a new job.
- New Job
- Free-style software project
- Under Build, select Invoke Ant
- Select Advanced
- Target : allPath Build : /var/lib/jenkins/jobs/MY_PROJECT_NAME/build.xmlProperties : jmeter.dir=/var/lib/jenkins/jmeter (reference to step 5.c)
- Down in Post-build Actions check the Publish Performance test result report checkbox
- Add a new report box and choose JMeter
- Set the branch to build to JMeterFor Report files specify **/*.jtl
- Add the build.xml at the root of the job folder (/var/lib/jenkins/jobs/MY_PROJECT_NAME/). At the end I added a build.xml file.
- Under the job folder (/var/lib/jenkins/jobs/MY_PROJECT_NAME/), create the following directory structure (the workspace folder and all it subfolder have to be in chmod 777 "chmod -R 0777 ./*").
+scripts
+workspace
++results
++++jtl
++++html - In the scripts folder upload the JMeter scripts files *.jmx
Usefull references
http://www.theserverlabs.com/blog/2009/04/23/performance-tests-with-jmeter-maven-and-hudson/
http://jlorenzen.blogspot.de/2008/03/automated-performance-tests-using.html
http://neyto.blogspot.de/2013/02/install-jenkins-with-jmeter-performance_2208.html
Build xml:
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"
classpathref="ant.jmeter.classpath" >
resultlogdir="workspace/results/jtl">
basedir="workspace/results/jtl"
destdir="workspace/results/html"
includes="*.jtl"
style="${jmeter-home}/extras/jmeter-results-detail-report_21.xsl">