Bot running speed tests continuously.
Bot that continuosly runs speed test (from various sites), generating a json file containing the results. It plots the results in an interactive graph, too.
It helps check the internet speed throughout a long period of time.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js v10.xx.x (probably works with more recent versions, too)
- Npm / Yarn
- Plotly free account (only if you want to get a chart of your speed test results)
Clone/Download the repository.
git clone https://github.com/jackroi/SpeedTest-Bot.git
Enter into SpeedTest-Bot folder and install the required packages using yarn
or npm
. It can take a few minutes, because puppeteer need to download chromium.
cd SpeedTest-Bot
yarn install
Configure Speed Test Bot following these steps.
Check whether the installation was successful.
yarn start -h
It sholud output a help text.
Rename or copy config-example.json
to config.json
, and change the content as you prefer, using your favourite text editor.
cp config-example.json config.json
output_file
: name of the output file, where the results will be storedheadless
:true
for activating headless mode (might not work flawlessly, see known issues section)false
for disabling headless mode (works better but can be frustrating if you're using the pc meanwhile)
time
:infinity
: the bot stops only when CTRL-C is pressed- how many seconds the bot should run
plot.username
: plotly usernameplot.api_key
: plotly api keyplot.generate_image
:true
if you do want a picture of the chart saved on your pcfalse
if you don't want the picture of the chart saved on your pc
yarn start -r | yarn start --run
Runs speedtests continuosly, it stops when you press CTRL-C or when the amount of time specified in config.json has elapsed. The results are saved into output folder.
yarn start -c | yarn start --clean
Generates two json files: one will contain the results divided by provider, the other will contain the results divided by type (single or multiple connections). The results are saved into output folder.
yarn start -p | yarn start --plot
Plots the results in a chart viewable online at the given URL or as an image (needs a plotly api key, for more informations read the readme.txt file). The resulting image is saved into output folder.
yarn start -s | yarn start --show
Shows the current settings stored in config.json.
- When headless mode is active, the bot stops at apparently random moments for apparently random periods, and then it normally resumes execution as if nothing had happened. The issues may be caused by different behaviours between headless mode and non headless mode.
- Node.js - Javascript runtime
- Puppeteer - Headless browser
- Yargs - Command line arguments parser
- Plotly - Graphs
- @jackroi - Idea & work
See also the list of contributors who participated in this project.