Firefox yslow and Showslow for Website testing and automation
Introduction-
Showslow is web based interface to collect yslow data. We can use yslow+showslow to get website loadtime and various other details provided by yslow.
This howto explains how to automate website loadtime/yslow testing using Firefox and Perl (Mechanize::Firefox, Firefox::Application module)
* Please download perl scripts and Strawberry perl for Windows-
URL-
http://www.indiangnu.org/wp-content/uploads/2012/firefox-cli-for-yslow-url-pl.txt
http://www.indiangnu.org/wp-content/uploads/2012/firefox-cli-for-yslow-url-from-csv-pl.txt
http://www.indiangnu.org/wp-content/uploads/2012/yslow-firefox-sh.txt
* Reguirement-
1) Firefox -MozRepl extension to connect to firefox using socket -firebug and yslow extension/addon
2) Perl -WWW::Mechanize::Firefox module -Firefox::Application module *
1] How to create Firefox profile-
root@arunb:/home/arunb/firefox-yslow# /var/firefox-4.0.1/firefox/firefox -CreateProfile yslow /home/arunb/firefox-yslow/yslow_firefox_profile Success: created profile ‘yslow’ at ‘/root/.mozilla/firefox/rjel2s26.yslow/prefs.js’ root@arunb:/home/arunb/firefox-yslow#
NOTE- On Window create profile with ‘firefox -p’ command
* 2] Showslow Setup-
Download showslow and put in Documentroot directory of apache/web server. Then Create DB,Add DB details in config file and type ‘make’ in source directory mysql> create database showslow; mysql> grant all privileges on showslow.* to ‘showslow’@localhost identified by ‘mypass’;
* 3] Now Configure Firefox to submit "yslow" results to "showslow"
Yslow 2.x extensions.yslow.beaconUrl = http://mywebserver/showslow/beacon/yslow/ extensions.yslow.beaconInfo = grade extensions.yslow.optinBeacon = true extensions.yslow.autorun = true
IMP- Please enable following setting in firefox. extensions.firebug.allPagesActivation", "on"
* 4] Perl and Firefox/Mechanize Module –
root@arunb:/home/arunb/firefox-yslow# ./firefox-cli-for-yslow-url.pl http://www.glam.com
For more info – http://www.showslow.org/Tools_configuration#ShowSlow_Installation_and_configuration http://getfirebug.com/wiki/index.php/Firebug_Preferences
Thank You,
Arun Bagul