Giter Site home page Giter Site logo

preacher's Introduction

Preacher: Web API Verification without Coding

PyPI version Documentation Status CircleCI Codecov Language grade: Python Code style: black

Preacher verifies API servers, which requests to the servers and verify the responses along to given scenarios.

Test scenarios are written only in YAML declaratively, without coding. In spite of that, Preacher can validate your web API flexibly, which enables you to test using real (neither mocks nor sandboxes) backends.

The full documentation is available at preacher.readthedocs.io.

Targets

  • Flexible validation to test with real backends: neither mocks nor sandboxes.
    • Matcher-based validation.
  • CI Friendly to automate easily.
    • A CLI application and YAML-based scenarios.

Usage

First, install Preacher.

The most basic way to install Preacher is using pip. Supports only Python 3.7+.

$ pip install preacher
$ preacher-cli --version

Instead of pip, Docker images are also available on Docker Hub as ymoch/preacher. By default, the container working directory is /work, and the host directory may be mounted here.

$ docker pull ymock/preacher
$ docker run -v $PWD:/work ymoch/preacher preacher-cli --version

Second, write your own scenario.

# scenario.yml
label: An example of a scenario
cases:
  - label: An example of a case
    request: /path/to/foo
    response:
      status_code: 200
      body:
        - describe: .foo
          should:
            equal: bar

Then, run preacher-cli command.

$ preacher-cli -u http://your.domain.com/base scenario.yml

For more information such as grammer of scenarios, see the full documentation.

License

MIT License

Copyright (c) 2019 Yu MOCHIZUKI

preacher's People

Contributors

ymoch avatar yuhshi avatar lasta avatar dependabot[bot] avatar

Stargazers

 avatar UCHIDA Masaru avatar chov(Kohei Tsuyuki) avatar

Watchers

James Cloos avatar  avatar

preacher's Issues

insert between retrying requests

Hi.
I use preacher to check Apache Solr statuses.
Apache Solr takes several seconds to wake up, so I want to insert sleep time between retrying requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.