I�ve come to this script anew after quite a long time away from it. A few things to watch out for:
The script uses a csv file to specify the webpagetest scripts to send down. The actual webpagetest part of this has to be url encoded BUT the step name shouldn�t be as it will break the Jenkins graphs. e.g:
csv data input file:
url_id,scriptDescription,script (this line is not included in the file)
The fail limit is used to decide on pass/fail for the original (full) pages
The testHost and testHostPort refer to your installation of webpagetest - you could point at the public one I guess.
The utility port is used for the �delete chrome profile� element which I have greyed out. I think at some point this proved useful for me. It runs a php script on my local apache server to do some local file handling. The port is where that apache is listening.
The jenkins jmeter plugin graphs only work with integer values (hence the change from Kbytes to bytes for the download size graph (see the jmeter script code)
To graph the jtl files in jenkins use this pattern **/*.jtl (just a reminder)
The loop count for the �runTest� thread sets the limit on how many lines in the csv file we will process. I HAVE SET THIS TO ONE in the script available at the top of this page. Only one line of the csv file will be processed in this case, probably ok for a component monitor but you could certainly expand this out with some more coding perhaps.
I have introduced the �item_url� which is used in the �find_item� element to dig out the metrics from the webpagetest details page. So you can easily change the component you wish to monitor. See the code for details.
Update: In my own copy of this script I have added an extra if controller around the monitor so I can run without it when required - don�t want to have loads of different jmx files around if I don�t need them. So, the if controller has this condition:
and then I can send down a parameter such as -Jitem_url=not_in_use
UPDATE 7th July 2015
Changed some urls to get the summary page and raw results etc. Latest versions of webpagetest seem to be using php pages for these links. See the code for details.