Loaded.js

Loaded.js is a small Node.js load testing framework with a focus on flexibility and test organization. Loaded.js takes a
a very minimal approach on how to specify a load test leaving a lot of work to the developer. This approach is particularly
useful when load testing more complex requests and advanced workflows.

In its current form Loaded.js requires

HTTP Request example

The example below requests the google homepage 50 times with a max of 5 concurrent users.

To run the test, copy and paste the code snippet in a file (for example test.js) and run the following commands:

$ npm install loaded
$ npm install request
$ node test.js

You can specify timers and multiple beforeAll, afterAll and test functions. See the detailed example below for more information.

Test options

When creating a test you can pass an object with the following options:

title: a test title. Defaults to ''.

iterations: the number of iterations. Defaults to 1.

concurrency: the number of tests to run in parallel. Defaults to 1.

errorHandler: an error handling function called when an error is detected in beforeAll, afterAll or test functions.
The error handler signature is function(err). Defaults to printing the error to the console.

Performance metrics / stats

Loaded.js does not automatically gather statistics on test execution performance. Gathering stats of the target application's
performance is best done directly from the environment itself. If you're serious about your application's performance consider
tracking performance metrics from the application using StatsD, Logstash/Kibana or something similar (also in production!).

Having said that, Loaded.js comes with a timer utility able to track execution times in milliseconds.

Single timer

Timers are identified by their name. You can start multiple timers with the same name. Results of timers with the same name
are aggregated in the stats report (see below).