Automatic testing using webpagetest APIs