Closed LyashenkoGS closed 5 years ago
You mean for errors or for all requests?
I mean for all requests.
It can be implemented, but keep in mind, for a bigger swagger template it may generare millions of tests, which would mean millions of files
I know. I think it'll be handy for troubleshooting the fuzzer itself. At least I hardcoded that functionality locally, during working on the fuzzer and it was more convenient than using Wireshark.
Finally this tiny feature is ready: Nov 4 21:56:50 HP-8460p 22715 [DEBUG] root: Request url:http://127.0.0.1:5000/exception/Co0 Request method: GET Request headers: {} Request body: None Nov 4 21:56:50 HP-8460p 22715 [DEBUG] urllib3.connectionpool: Starting new HTTP connection (1): 127.0.0.1 Nov 4 21:56:50 HP-8460p 22715 [DEBUG] urllib3.connectionpool: http://127.0.0.1:5000 "GET /exception/Co0 HTTP/1.1" 500 73 Nov 4 21:56:50 HP-8460p 22715 [DEBUG] root: Response code:500 Response headers: { "Content-Type": "text/html; charset=utf-8", "Content-Length": "73", "Server": "Werkzeug/0.16.0 Python/3.6.8", "Date": "Mon, 04 Nov 2019 20:56:50 GMT" } Response body: b"Test application exception: invalid literal for int() with base 10: 'Co0'"
[new feature] As a user, I want to set logging level as command line parameter. The output and reports with log level debug should include request/response with headers. Example:
python fuzzer.py -s your_swagger_definition.json -u http://localhost:8080/ --log DEBUG
Output: