[LRUG] Testing Browser Connections and Timings via Ruby

Frederick Cheung frederick.cheung at gmail.com
Tue Sep 18 08:55:21 PDT 2012



On 18 Sep 2012, at 16:51, David Burrows <david at designsuperbuild.com> wrote:

> Hi All,
> 
> I've got an app that I regularly need to test/monitor front end page performance and external (browser side) service connection data, some of which are iframe embeds. Up until this point I've been doing it by hand (Chrome Inspector Network panel + HAR exports) thinking at some point I'd automate. That day has come but I'm having trouble finding an easy way to do it so I thought I'd ask the LRUG omni-mind.
> 

I think that if you load pages in phantomjs (eg via poltergeist) that you can get all the data that goes into the network activity panel

Fred



> At the moment I've got a vaguely usable solution that involves the test setup starting a WEBrick::HTTPProxyServer in a separate thread that writes request/response data to a logfile - the tests then run via a Selenium driver set up to use that proxy, wait a bit for everything to finish loading , then parse the logfile to see if all connections have been made correctly. Not much usable timing data in that but may just need a bit of hacking.   
> 
> I've had a look at the Web Timing API but this only seems to give me page load details not page element (.js, .json, .jsonp) times and doesn't really go into enough detail.
> 
> I've also had a look at the Chrome Remote Debugging API but it looks as if it would be quite a bit of work to get this integrated in testing.
> 
> Any ideas or pointers to things I've missed?
> Cheers,
> David
> 
> -- 
> David Burrows
> 079 1234 2125
> @dburrows
> 
> http://www.designsuperbuild.com/ | @dsgnsprbld
> 
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120918/1eea590c/attachment-0003.html>


More information about the Chat mailing list