Here I would illustrate how we can run speedtest with command line.
Let's go to the terminal console in your vps:
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py chmod +x speedtest-cli ./speedtest-cli
The picture is showed as follows.
It is simple and easy, isn't it?
You even can specify the speedtest location which you desire for. For instance, you probably want to test the connection speed between Dallas and Los Angeles.
Go to this web page http://www.speedtest.net/speedtest-servers-static.php
and press Ctrl+F to search the location "Dallas".
Note: If your browser shows blank here, try to use Firefox and such like which support viewing php file.
Remember the id number here because it would be used later. Here I take the number 10596 for Dallas location.
Then let's come to the terminal again in vps.
./speedtest-cli --server 10596
The result is showed as follows.