Project

oncall

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
BDD for JSON API's
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.2.0
= 3.9.0
= 2.0.7

Runtime

= 0.8.1
 Project Readme

🤙 Oncall

Build Status Gem Version

Oncall is a DSL for testing JSON API's.

Install

$ gem install oncall

Table of content

  • Get started
  • Usage
  • Configuration
  • License
  • Acknowledgments

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