New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apitance

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apitance

Elegant, expressive and versatile acceptance HTTP API tests

  • 0.1.0-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

apitance Build Status Dependency Status Code Climate NPM

Elegant, versatile and expressive BBD-style acceptance tests for your HTTP API using Cucumber

Just write what you want and what you expect using Gherkin syntax. Apitance provides a built-in reusable Cucumber descriptive steps which aims to cover all the test cases that involves an HTTP API

Work in progress

Usage

$ npm install -g apitance
$ apitance -r features/user.feature

Steps

Request contract

Verb definition

Given a request with method ([a-z]{3,7})

Request headers

And the request header "(.*)" with value "(.*)"
And the context type is "(.*)"
And the accept MIME type is "(.*)"

Request path

And the request path is (/path/test)

Request query params

And define a query string key (search) with value "Chuck Norris"
And it have the query string "(.*)"
Flow control

Wait/defer

And I wait 10 seconds
Requests pool
And create a pool of 100 clients using a stack of 20 concurrent
And wait 100 miliseconds on each pool
Response expectation
Testing

API

Contributing

Wanna help? Cool! It will be really apreciated :)

apitance is completely written in LiveScript/Wisp language. Take a look to the language documentation if you are new with it. and follow the LiveScript language conventions defined in the coding style guide

You must add new test cases for any new feature or refactor you do, always following the same design/code patterns that already exist

Development

Only node.js is required for development

Clone/fork this repository

$ git clone https://github.com/h2non/apitance.git && cd apitance

Install dependencies

$ npm install

Compile code

$ make compile

Run tests

$ make test

License

MIT © Tomas Aparicio

Keywords

FAQs

Package last updated on 17 Dec 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc