loadtest
Version:
Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. Includes an API for automated load testing.
24 lines (18 loc) • 399 B
JavaScript
import testing from 'testing'
import {TcpClient} from '../lib/tcpClient.js'
function testHttpClient(callback) {
const options = {
url: 'http://localhost:7358/',
maxSeconds: 0.1,
concurrency: 1,
};
const client = new TcpClient({options});
client.stop()
testing.success(callback);
}
/**
* Run all tests.
*/
export function test(callback) {
testing.run([testHttpClient], callback)
}