Skip to main content

Tool for testing API endpoints that have Open API / Swagger specifications using locustio

Project description

swagger2locustio

swagger2locustio - a tool for testing API endpoints that have Open API / Swagger specifications using locustio.

It generates locustfile.py from the application schema.

Supported specification versions:

  • Swagger 2.x

Installation

To install swagger2locustio via pip run the following command:

pip install swagger2locustio

Usage

Command line options

usage: swagger2locustio [-h] -f SWAGGER_FILE [-r RESULTS_PATH] [-v] [-s {0,1,2}]
                        [-o {get,post,put,patch,delete,head,options,trace} [{get,post,put,patch,delete,head,options,trace} ...]]
                        [--paths-white PATHS_WHITE [PATHS_WHITE ...]] [--paths-black PATHS_BLACK [PATHS_BLACK ...]] [--tags-white TAGS_WHITE [TAGS_WHITE ...]]
                        [--tags-black TAGS_BLACK [TAGS_BLACK ...]]

optional arguments:
  -h, --help            show this help message and exit
  -f SWAGGER_FILE, --swagger-file SWAGGER_FILE
                        path to swagger file (default: None)
  -r RESULTS_PATH, --results-path RESULTS_PATH
                        path to store locustfile.py (default: generated)
  -v, --verbose         verbose (default: False)
  -s {0,1,2}, --strict-level {0,1,2}
                        add paths with required params without default values to locust tests (default: 2)
  -o {get,post,put,patch,delete,head,options,trace} [{get,post,put,patch,delete,head,options,trace} ...], --operations {get,post,put,patch,delete,head,options,trace} [{get,post,put,patch,delete,head,options,trace} ...]
                        operations to use in api testing (default: ['get'])
  --paths-white PATHS_WHITE [PATHS_WHITE ...], --pw PATHS_WHITE [PATHS_WHITE ...]
                        paths to use in api testing (default: [])
  --paths-black PATHS_BLACK [PATHS_BLACK ...], --pb PATHS_BLACK [PATHS_BLACK ...]
                        paths not to use in api testing (default: [])
  --tags-white TAGS_WHITE [TAGS_WHITE ...], --tw TAGS_WHITE [TAGS_WHITE ...]
                        tags to use in api testing (default: [])
  --tags-black TAGS_BLACK [TAGS_BLACK ...], --tb TAGS_BLACK [TAGS_BLACK ...]
                        tags to use in api testing (default: [])

Contributing

Please, see the CONTRIBUTING.md file for more details.

License

The code in this project is licensed under MIT license. By contributing to swagger2locustio, you agree that your contributions will be licensed under its MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swagger2locustio-0.0.3.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swagger2locustio-0.0.3-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file swagger2locustio-0.0.3.tar.gz.

File metadata

  • Download URL: swagger2locustio-0.0.3.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for swagger2locustio-0.0.3.tar.gz
Algorithm Hash digest
SHA256 cfaac4223fc4c6ba91f461a6b3b11936f89d5753798bae8464b31524c9874e96
MD5 ca3edd326116e32c3279f79304bb5588
BLAKE2b-256 851194744f204c9cdf1c64fb85de5a0cc65ff9751ae6da9b2b1bdbcbfe8b4bc1

See more details on using hashes here.

File details

Details for the file swagger2locustio-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: swagger2locustio-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for swagger2locustio-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 193786fac8b5a9a4b62e45c09f892cc4e32e975f3fdbef20e874deac51bcfc39
MD5 c91f9c25f111c3c016c18012f6f3e98d
BLAKE2b-256 bbe44f6c5d0bcf6d2830113ae67d084c12976268d684c9bd15c62b7e09cde7da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page