Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Automatically test your swagger API

Project Description


Swagger-tester will test automatically your swagger API. Swagger API made with connexion ( are supported directly without running the API server. In the case you use connexion it will automatically run a test server from your swagger file.

To run the test, swagger-tester will detect every path and actions of your API. And for each, it will send a request and check if the response match the swagger file specification.

Example Usage

from swagger_tester import swagger_test

 # Dict containing the error you don't want to raise.
 # By default, every status_code over other than 1xx, 2xx or 3xx
 # will be considered as an error.
 authorize_error = {
       'post': {
           '/pet/{petId}': [200],
           '/pet': [200]
       'put': {
           '/user/{username}': [200],
           '/pet': [200]
       'delete': {
           '/pet/{petId}': [200],
           '/store/order/{orderId}': [200],
           '/user/{username}': [200]

 # Run the test with connexion
 # An AssertionError will be raise in case of error.
 swagger_test('path_to_your_swagger.yaml', authorize_error=authorize_error)

 # Or if you have a running API
 swagger_test(app_url='', authorize_error=authorize_error)


More documentation is available at


make install or pip install swagger-tester


swagger-tester is licensed under


0.2.7 (2016-11-22)

  • TODO

0.2.6 (2016-5-20)

  • Fix repeated base path bug

0.2.5 (2016-3-25)

  • Add support for headers parameters.

0.2.4 (2016-3-23)

  • Improve the check of status code when ‘default’ is in the specification.

0.2.3 (2016-2-10)

  • Fix some errors (like file upload).

0.2.2 (2016-2-3)

  • Fix validation of standard types.

0.2.1 (2016-1-31)

  • Change license to MIT.

0.2.0 (2016-1-31)

  • Now support swagger APIs not made with connexion.

0.1 (2016-1-29)

  • First release on PyPI.
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
swagger_tester-0.2.7-py2.py3-none-any.whl (9.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 22, 2016
swagger_tester-0.2.7.tar.gz (20.3 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting