Skip to content
forked from slaily/pyhttptest

A command-line tool for HTTP tests over RESTful APIs✨

License

Notifications You must be signed in to change notification settings

gridl/pyhttptest

 
 

pyhttptest: HTTP tests over RESTful APIs✨

Pissed about writing test scripts against your RESTFul APIs anytime? Describe an HTTP Requests test cases in a simplest and widely used format JSON within a file. Run one command and gain a summary report.

pyhttptest in the command line

Installation

Recommended installation method is to use pip:

$ pip install pyhttptest

Python version 3+ is required.

Usage

$ pyhttptest execute FILE

See also pyhttptest --help.

Examples

Create a .json file and define a test case like an example:

FILE: GET_USERS.json

{
  "name": "TEST: List all users",
  "verb": "GET",
  "endpoint": "users",
  "host": "https://github.com",
  "headers": {
    "Accept-Language": "en-US"
  },
  "query_string": {
    "limit": 5
  }
}

Execute a test case:

$ pyhttptest execute FILE_PATH/GET_USERS.json

Dependencies

Under the hood, HTTPie uses these two amazing libraries:

  • ijson — Iterative JSON parser with a standard Python iterator interface
  • jsonschema — An implementation of JSON Schema validation for Python
  • Requests — Python HTTP library for humans
  • tabulate — Pretty-print tabular data
  • click — Composable command line interface toolkit

Contributing

See CONTRIBUTING.

Change log

See CHANGELOG.

Licence

BSD-3-Clause: LICENSE.

Authors

Iliyan Slavov

About

A command-line tool for HTTP tests over RESTful APIs✨

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%