.. image:: https://travis-ci.org/Trax-air/swagger-tester.svg?branch=master :alt: Travis status :target: https://travis-ci.org/Trax-air/swagger-tester .. image:: https://badges.gitter.im/Trax-air/swagger-tester.svg :alt: Join the chat at https://gitter.im/Trax-air/swagger-tester :target: https://gitter.im/Trax-air/swagger-tester?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge .. image:: https://img.shields.io/pypi/v/swagger-tester.svg :target: https://pypi.python.org/pypi/swagger-tester/
Swagger-tester will test automatically your swagger API. Swagger API made with connexion (https://github.com/zalando/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.
You may find related libraries to this one:
.. code:: python
from swagger_tester import swagger_test
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] } }
swagger_test('path_to_your_swagger.yaml', authorize_error=authorize_error)
swagger_test(app_url='http://petstore.swagger.io/v2', authorize_error=authorize_error)
More documentation is available at https://swagger-tester.readthedocs.org/en/latest/.
make install
or pip install swagger-tester
swagger-tester is licensed under http://opensource.org/licenses/MIT.