Our legacy site: www.webwob.com   

Updates for running WebPageTest trhough Jenkins

I am still using WebPageTest locally and this page will add to the legacy pages with any new developments on my project.

    recent bash updates     jmeter updates*     jmeter v3.1     Start agent     WPT Jenkins job

shell script to run from within (cygwin BASH) Jenkins

Run this from a Jenkins shell, best to have it as your first shell in a standard Jenkins WebPageTest build - see here.

This script reduces the size of the html results log that we keep in the workspace. This makes it easier to scroll up and down the sets of results. Be aware that the old results are still on the file system. (Currently I control disk space usage by limiting the number of builds Jenkins keeps.)

  echo "in first shell script"
  rm -f *.jtl
  ls -all xml-returned-log.html
  echo "Trim the results file down"
  sed --in-place 's#<strong><font color=blue>Test starting#\n<strong><font color=blue>Test starting#g' xml-returned-log.html
  for i in `seq 1 10`;
              count=$(grep -n "Test starting" xml-returned-log.html | awk 'BEGIN {FS=":"} {print $1}' | wc -l)
              echo "count = ${count}"
              if [ "${count}" -ge "12" ]
               echo "got lots of results. Delete some now."
               first=$(grep -n "Test starting" xml-returned-log.html | awk 'BEGIN {FS=":"} {print $1}' | head -1)
               sed -i "1,${first}d" xml-returned-log.html
  echo "Finished. Put html file back"
  cat xml-returned-log.html | tr -d '\n' > temp_tr; rm xml-returned-log.html ; cp temp_tr xml-returned-log.html
  ls -all xml-returned-log.html