A web API verification tool.
Project description
Preacher: Flexible Web API Verification
Preacher verifies API servers, which requests to the servers and verify the responses along to given scenarios.
Scenarios are written in YAML, bodies are analyzed jq or XPath queries and validation rules are based on Hamcrest (PyHamcrest) so that any developers can write without learning toughly.
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 from PyPI. Supports only Python 3.7+.
$ pip install preacher
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
Copyright (c) 2019 Yu MOCHIZUKI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
preacher-0.11.0.tar.gz
(21.6 kB
view hashes)
Built Distribution
preacher-0.11.0-py3-none-any.whl
(34.0 kB
view hashes)
Close
Hashes for preacher-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97931f9120f17f254316745ccb35af729fb505603f1ce7e94728b883b1582ce |
|
MD5 | 48f4d8b7bd9a21a2cabe10aa698518ee |
|
BLAKE2b-256 | 5a63eab583fa8d4d2c07f02cbd666507c443574c5a6ae3ebcd1fd95d82f97993 |