Elegant, expressive and versatile acceptance HTTP API tests

Usage no npm install needed!

<script type="module">
  import apitance from 'https://cdn.skypack.dev/apitance';


apitance Build Status Dependency Status Code Climate NPM

Elegant, versatile and expressive behavior-driven acceptance tests for HTTP APIs based on Gherkin language and built-on-top of Cucumber

Still work in progress


  • Generic and reusable steps with expressiveness and multiple alias
  • Full HTTP protocol features support, including authentication, headers, cookies
  • High number of assert/expectation expressions for responses validation
  • Request/responses caching, reuse and chaining
  • Validate body responses against JSON schema
  • API discovering based on RAML
  • Support all the Cucumber.js features, such as hooks, configuration, stages...
  • Built-in support for templating and variables such as environment variables
  • Extended syntax with conditionals, control flow and more...
  • Send body payload data from external files or remote servers
  • Extending support. You can create or overwrite custom steps


Apitance requires you have installed node.js or io.js

[sudo] npm install -g apitance

Or install it as standalone self-contained package:

sudo curl -s -L https://raw.github.com/h2non/apitance/master/bin/install | bash


$ apitance -r features/user.feature

Command-line interface

Getting help

$ apitance --help
$ apitance -r path/to/steps path/to/feature


Wanna help?

apitance is completely written in JavaScript Harmony (ECMAScript 6)

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


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


MIT © Tomas Aparicio