apitance
![NPM](https://img.shields.io/npm/v/apitance.svg)
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