bench-rest is a Node.js library (v1.2.4, no recent release) for load-testing REST APIs using a declarative DSL. It combines request, async, and measured to define REST flows with setup/teardown, token substitution, and concurrency control. Metrics include latency, throughput, and error counts. Last updated around 2016; works with Node >=0.10. Simpler than artillery but limited to HTTP(S); no WebSocket support.
npm install bench-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a simple GET flow, runs 100 iterations with 10 concurrent connections, and logs stats on completion.
Pin request to a specific version or suppress warnings. Consider migrating to a newer tool like artillery.
Use Node <10 or pin bench-rest to v1.2.0 and test thoroughly.
Use #{INDEX} for iteration index (starts at 1). For custom tokens, ensure they are strings.Use an object with 'main' array for multi-step flows.
npm install bench-rest
Use const benchrest = require('bench-rest')Attach listeners to the returned emitter: benchrest(flow, opts).on('end', ...)