0.0.1 • Published 6 years ago

overspeed v0.0.1

Weekly downloads
5
License
MPL-2.0
Repository
github
Last release
6 years ago

Node OverSpeed API Testing Tool

Write API load / smoke tests in JavaScript or JSON.

JavaScript Style Guide CircleCI

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"
        }
      }
    ]
  }
}