BDD for JSON API's


Keywords
api, cli, dsl, json-schema, ruby, testing
License
MIT
Install
gem install oncall -v 0.4.0

Documentation

🤙 Oncall

Build Status Gem Version

Oncall is a DSL for testing JSON API's.

Install

$ gem install oncall

Table of content

Get started

Initialize

$ oncall --init

Add tests

group :user do
  header 'Content-Type' => 'application/json'

  schema = {
    'type' => 'object',
    'required' => ['foo'],
    'properties' => {
      'foo' => { 'type' => 'string' }
    }
  }

  param id: 1

  get '/users/:id' do
    status 200
    validate schema
  end
end

Run them

$ oncall

Usage

Usage: oncall [options]
        --env ENV                    Specify the environment to test against
        --path PATH                  Set the path for finding tests
        --pattern PATTERN            Load files matching pattern
        --exclude PATTERN            Exclude files matching pattern
        --group GROUP                Filter tests by group
        --persist PATH               Write output to a file instead of $stdout
        --config PATH                Path to the config file
        --init                       Initialize your project with Oncall
        --verbose                    Increases the verbosity level for a more detailed output
        --version                    Display the version
        --help                       This help message

Configuration

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments