Skip to main content

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

Metadata

Release files for preacher 0.15.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for preacher 0.15.11
File Size Uploaded
preacher-0.15.11.tar.gz 44.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for preacher 0.15.11
File Interpreter ABI Platform
preacher-0.15.11-py3-none-any.whl Python 3 none any Details

Total release size: 123.3 kB

Release files / preacher-0.15.11.tar.gz

Download URL preacher-0.15.11.tar.gz
Size 44.2 kB
Tags Source
SHA-256 checksum
How to use checksums
52e8599e5c643d5ebbef3659249dc4cd3e2ff2fdcca1613c1dee4d1a2f7da1f7
BLAKE2b-256 checksum
How to use checksums
597993c060114be1e5d1c77255131f6606ad0db3ec3f3c8ab6008389d792c7c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.7.13 Linux/5.13.0-1023-aws

Release files / preacher-0.15.11-py3-none-any.whl

Download URL preacher-0.15.11-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b7469647f23d663f306582c3655e6a9238861edc8e54b9b85004026ecae839d
BLAKE2b-256 checksum
How to use checksums
d2edb2000abb56a95c06aaa387085504e4e9d8cc1e1812f23489320a8072bb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.7.13 Linux/5.13.0-1023-aws

Release history Release notifications | RSS feed

This release

0.15.11 This release

2 release files

0.15.9

2 release files

0.15.8

2 release files

0.15.5

2 release files

0.15.4

2 release files

0.15.3

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.9

2 release files

0.14.7

2 release files

0.14.6

2 release files

0.14.5

2 release files

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.13.0

2 release files

0.11.7

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.11

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page