Sep 29, 2015
Bundle Load Testing with a Project
If you need to be able to run load tests on a project, but don’t want each developer to have to install something like Siege on their own computers in order to run them, you’ve come to the right place. I’ll outline how to bundle load testing functionality with a project. We’ll make use of an open source node.js package: loadtest. These steps assume you have node.js installed.
- Run
npm init
and create apackage.json
file at the root of your project. Runnpm i --save-dev loadtest
and addloadtest
as a dev dependency.
"devDependencies": {
"loadtest": "*"
},
- Create a symbolic link in the root of your project so that the loadtest command can be run from there.
ln -s ./node_modules/loadtest/bin/loadtest.js loadtest
Now anybody working on the project just needs to run npm install
, then they can run load testing commands such as this: loadtest http://vvv.dev/ -c 100 -t 10
Full documentation for loadtest
is here:
https://www.npmjs.com/package/loadtest