mercredi 14 avril 2021

How to get from the test all api-methods executed through the library requests (python)?

I have api requests in my test (written in pytest) that are sent through the requests library (python). I have a task: "Pull all api-methods from the test". So, is there any library for some decorator to be hung on the test, and when starting the test, this decorator wrote to some log file all data (requests, responses) executed in the test using the requests library? Important: we should not change the test itself in any way, the whole test should remain inside unchanged (it is only allowed to hang a decorator). If no such miracle library exists, then I will still be grateful to you if you offer me your own solution to this problem.

Aucun commentaire:

Enregistrer un commentaire