overspeed
v0.0.1
Published
Write API load and smoke tests in JavaScript or JSON format.
Downloads
7
Maintainers
Readme
Node OverSpeed API Testing Tool
Write API load / smoke tests in JavaScript or JSON.
Install
npm i -g overspeed
# or
npm i --save-dev overspeed
Running
os-test overspeed.js -o testResults
# or
os-test overspeed.js -o testResults
Building Tests With JavaScript
Example
'use strict';
const {TestBuilder, Request, Flow} = require('overspeed');
exports.default = new TestBuilder()
.setTestLength(1000 * 60) // 1 minute
.setUserCount(1)
.startPlan(
Flow.parallel(
Request.http({
method: 'get',
uri: 'http://localhost:3000'
})
)
);
Building Tests With JSON
Example
{
"config":{
"testLength":20000,
"userCount":1
},
"plan":{
"type":"flow",
"name":"parallel",
"flow":[
{
"type":"request",
"name":"http",
"config":{
"method":"get",
"uri":"http://localhost:3000"
}
}
]
}
}