How to Configure and Run JMeter Scripts by Jenkins for Windows

Before we start working on Jenkins we have to install Java on our system. To learn about how to set up java in your system follow the link

To run scripts on Jenkins firstly we have to create a Jmeter script. To learn about how to create Jmeter script follow the link

Step-1 Firstly download and install Jenkins on your system. You can download Jenkins using the link

Step-2 Now go to localhost:8080 and  enter the secret key which you will find in your system Program files and then install the required plugins.

Step-3 Now you can create account or you can continue as admin

Step-4 In the next step we will download the Performance Plugin. To do so click on Manage Jenkins >> Manage Plugins >> Available and then search for Performance Plugin.

Step-5 Now go to the Jmeter/bin and add below line in

Step-6 In next step create a Jmeter Test which you want to run on Jenkins

Step-7 Now create a new job in Jenkins. To do so go to Jenkins dashboard and then click on Create New Job. Enter the name of your job let it be JenkinsTest and choose Freestyle Project and click on OK button.

Step-8 In the next step we will add Build Step by choosing the Execute Windows Batch Command in the Build option.

After selecting Windows Batch command write the below command in Command area. This command includes the path of your jmx file, jtl file and output folder.

%BUILD_ID% – is used to give dynamic numbering to the files.

Step-9 In the next step we will add Post Build Actions. To do so select Publish Performance Test Result Report and fill the details accordingly.

In the Source Data Files enter the path of jtl file –

Note- Instead of using %BUILD_ID% use ${BUILD_ID} as it does not detect files using %BUILD_ID%.

And Save your changes.

Step-10 Now click on Build Now Option to run your job

Step-11 You can validate the build by going to Console Output