🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

batty

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

batty

A testing tool for the Threepio API spec

0.1.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Batty

Roy Batty

Batty is a tool to test implementations of the Threepio API.

Installation

$ npm install batty

Usage

To test a Threepio implementation, first set your framework up such that the following is true:

  • The MCP has a command, called "echo", that takes one argument and returns it.
  • There is one Robot, named 'TestBot'. It has the following properties:
    • One 'loopback' connection.
    • One 'ping' device.
    • A 'hello' command, that takes one argument and interpolates the result into a string. e.g. hello("world") == "Hello, world!"

Then, when the API is started up, run the batty command, pointing it to the root API path. e.g.

$ node robot.js
  [...]
  I, [2014-07-10T21:41:36.309Z]  INFO -- : Working.
  I, [2014-07-10T21:41:36.313Z]  INFO -- : Cylon API Server is now online.
  I, [2014-07-10T21:41:36.313Z]  INFO -- : Listening at https://127.0.0.1:3000

# in another shell
$ batty https://127.0.0.01:3000

Batty will then poke and prod at the API, and test to make sure it meets the Threepio spec.

Caveats

If you attempt to run Batty against an API server with a self-signed SSL cert, the event tests will fail, as EventSource cannot verify the cert before connecting.

Version History

  • 0.1.0 - Initial release.

License

Apache 2.0. For more details, see LICENSE file.

FAQs

Package last updated on 18 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts