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.
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='http://petstore.swagger.io/v2', authorize_error=authorize_error)
Documentation
More documentation is available at https://swagger-tester.readthedocs.org/en/latest/.
Setup
make install or pip install swagger-tester
License
swagger-tester is licensed under http://opensource.org/licenses/MIT.
History
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.
Metadata
Release files for swagger-tester 0.2.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| swagger_tester-0.2.12.tar.gz | 20.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swagger_tester-0.2.12-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 27.5 kB
Release files / swagger_tester-0.2.12.tar.gz
| Download URL | swagger_tester-0.2.12.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
574b05d2b7d062c00093a7a688edca54a5c3c5cc3ce7f7074ef4e51087f957e6
|
|
BLAKE2b-256 checksum How to use checksums |
60af1d4df1984f255140b77e713e41260c414a030401f9babb7b6f96a5363a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / swagger_tester-0.2.12-py2.py3-none-any.whl
| Download URL | swagger_tester-0.2.12-py2.py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b251d25348c4fde95d2e6ac207d39853f2b556d195827e4f5ff9b3f54c710ed3
|
|
BLAKE2b-256 checksum How to use checksums |
263b53085240ecd2bfae020f141ab14fc7bc537c461e799fdd8d8cb6d1570017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for swagger-tester 0.2.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.