I'm interested in this too. I'd like a way of automating speed tests from various locations to keep stats on network availability. I may experiment with phantomjs, but would prefer to use something smaller or natively executable on standard linux configs.