A simple tool to load test APIs using api-benchmark and analyse result.
356
It's a dockerized tool to load test APIs. Either pull the image using docker pull johnshumon/docker-api-benchmark or build from Dockerfile. Make a directory where test script (e.g. start-test.js) would be in. Once image is built successfully launch the container either with docker-compose file or following command:
docker run --name benchmarker -it -dp 8096:8096 -v `pwd`/test-script:/api-benchmark/test-script api-benchmark
Above command mounts test script directory. Now you can start load-testing your APIs either from inside or outside of the container. Once container is launched execute either one of the following
Commands:
Get inside the container
$ docker exec -it benchmarker /bin/sh
Run the test
$ /api-benchmark/start-test.js
Command:
Run the test
docker exec benchmarker node ./test-script/start-test.js
Number of endpoints to be added and configured with heavy traffic are listed in start-test.js file.
Reports of API load test are browsable through http://<container_host_ip>:8096
Content type
Image
Digest
Size
20.9 MB
Last updated
over 9 years ago
docker pull johnshumon/docker-api-benchmark