Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

koenwoortman/oncall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤙 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