wP Jenkins

Integrating webPageTest into the Jenkins Build updates

I�ll start this write up from the top but you�ll have to read the other parts before you can follow all of this. Jenkins uses jmeter which in turn calls webPageTest so there are a few interfaces to deal with.

To start with, set up Jenkins with a suitable project name and I�ve added a description of the box that we are going to run on. Because we are running client side tests the box does make a difference. The project name is used below.


We need to clear the workspace so previous build�s jtl files don�t merge with this build. I mention this step because if you are running Jenkins from windows the $WORKSPACE variable doesn�t work, so you have to hard code the path, hence the significance of the porject name. Watch this when you clone new Jenkins projects based on old ones...


We then call jmeter. I have put some usage notes in this step and there are a few options to set that are passed down to webPagetest. Ultimately you can set quite a few options at this level so it depends on your project needs how you configure this. For example, I haven�t set how many test runs to average results over, I�ve set a default value for that in the jmeter interaface.

Also, I�m using a separate batch file to call jmeter. This is generally a useful method to use, perhaps to hide ssh login details from the Jenkins logs etc. See below for details.

In this case it�s not really needed but it does allow later flexibility without having to change the Jenkins setup. If your Jenkins is tied down, this can be useful.


The batch file in this case just passes the options down to jmeter:


Finally add a post build step that uses the jmeter Jenkins performance plugin to build the graphs:


I thought it was worth putting this note here. I have in the past needed to add build steps to Jenkins that contain sensitive data. In this case you can hide that data by using a few levels of batch files and redirecting output (standard and error) to null. this is a 3 stage process, with Jenkins calling a batch file and that batch file calling another one with the sensitive data in it. I found this level of redirection was needed, particularly on error when Jenkins reports back into it�s console log. (This is a windows based Jenkins):




[Home] [About (CV)] [Contact Us] [JMeter Cloud] [webPageTest] [wP Highlights] [wP Overview] [wP Jenkins] [wp Jmeter] [wP Input] [wP Start] [wP While] [wP Results] [wP Utilities] [_64 images] [asset moniitor] [Linux Monitor] [Splunk ETL] [Splunk API] [AWS bash] [LR Rules OK] [LR Slave] [LR CI Graphs] [LoadRunner CI] [LR CI Variables] [LR Bamboo] [LR Methods] [LR CI BASH] [Bash methods] [Jenkins V2] [Streaming vid] [How fast] [Finding Issues] [Reporting] [Hand over] [VB Scripts] [JMeter tips] [JMeter RAW] [Dynatrace] [Documents] [FAQ] [Legal]

In the Cartesian Elements Ltd group of companies