How to use Performance Plugin in Jenkins

Assumptions:    Jenkins has been installed.
                        Jmeter has been downloaded and ready to run.
                        Maven is installed in the machine.

Step 1 : Install Performance Plug-in in Jenkins.


Initially we have to install the Jenkins plug-in because it is a useful tool to read the .jtl files which will be the output of the test plans we are going to create.
URL :https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin

You can see it in Jenkins. Manage Jenkins --> Manage Plug-ins --> Available (tab) . Under that you will find this plug-in. Check it in and install. After installing , it will appear in Installed (tab).
That concludes installing Performance plug-in in jenkins.

Step 2: Creating a test plan.


The easiest way to create a test plan for your own web application is to record an action you do in the system which you want to include in the plan.

Start Jmeter. Add a Thread group to the plan. Then add a HTTP Proxy server in Non-Test Element. Set the proxy of the Server and the Web browser Proxy to the same and start the server. Then you can visit the web app you need and load the pages as you wish. All the data which will get downloaded, will be recorded so that when you stop the server recording. You will see that the data is listed under the Thread Group. You can save it as a test plan.

Then one of the next important  is how to view the results. For that you can use listeners in the add option. By adding the listeners you can view the results in the summarized tables, Trees and also in graphs.

Step 3: Integrating Performance plug-in to your Jenkins job.



Here I will explain how to configure the performance plug-in to a Jenkins job. Under the configure page of your Jenkins job, you will find a heading call "Post-build Actions"  . In that you can see a drop down saying Add post build action. There is an option call "Publish Performance test result report". When you select that, you can add jmeter reports into the plug-in. Under the report files URL, we can add the reports directory. Also we can define our thresholds for failures and unstable.

Comments

Popular posts from this blog