I have a set of API tests created with mocha and chai. There are some instances where I run them and get 401 (unauthorized) or 500/503 (server failure) errors. The most likely cause of these errors is an improperly configured or overloaded server. Because the tests often do a single https request, then do multiple https requests for each object returned by the first request, it is likely that the number of requests varies considerably each time it is run.
To facilitate debugging the system, I would like to have a log (or at least a count) of all the https requests issued by the tests. Is there an extension to mocha or chai that would allow me to capture all the requests, or is this something I would have to create myself?
Aucun commentaire:
Enregistrer un commentaire