I have been using Speedtest.net by Ookla for testing my connection speed. On desktop I use the website. In my mobile phone, I use the mobile app.
In my Linux servers, I use speedtest-cli. It is a Python app, installation/usage instruction is published on Github.
Basis usage
speedtest-cli
Display list of speedtest.net servers (sorted by distance).
speedtest-cli --list
Use server hosted by TM in Kuala Lumpur.
speedtest-cli --server=10327