Scripting YSlow and/or PageSpeed

柔情痞子 提交于 2019-12-04 20:59:15
AutomatedTester

I recently did a talk about this at Google Test Automation Conference in Zurich for this.

Slides for it are here

And I did a blog post on my company site about it and that can be found here

We were able to use the YSlow Beacon and Selenium together to automate the entire process.

I hope that helps!

Also check out GTmetrix which can do PageSpeed and YSlow analysis from a variety of reasons and has a free API you can use to automate this.

Not sure if you use Grunt in your development workflow, but there is a great package avaible that allows for easy scripting - check it out:

https://www.npmjs.org/package/grunt-pagespeed

Once you run it, it will output the results as follows:

Or, if you prefer to write your own, the Google PageSpeed API is also quite easy to use. Check out this blog post for more information:

http://deanhume.com/home/blogpost/the-google-pagespeed-api-and-mvc-4/86

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!