-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally log request & response bodies? #32
Comments
Thanks for the issue! 👍 I've updated the docs to reflect some recent changes in We actually have an implementation of a HAR logger for Martian internally that we held off on open sourcing because it's not entirely to spec. Some places of the spec are vague and there are some fields we just haven't implemented. We can look into prioritizing open sourcing it. I'd like to understand your use case a bit more though. What problem are you trying to solve with HAR logs? Do you need HAR specifically or would any log formatted as JSON work? I ask because we've talked about doing a more lightweight JSON log format for Martian in the past. |
I'd be very interested in a HAR logger even if it's not entirely to spec. My use case is Selenium web testing. Typically I use browsermob-proxy to capture HAR files. This enables testing a bunch of scenarios that standard selenium is not able to handle. |
Okay, cool. We'll work on cleaning up the HAR implementation. We built a Verifier API for Martian that was intended to solve these use cases without requiring users to reimplement the verification logic across languages/platforms and enable verifications to be made for requests where loading the entire message body into memory before asserting may not be feasible (video streaming, large file downloads). We have a couple verifiers built in already; here's one for verifying status codes. We have a couple open issues for making the API better (#27, #28) and would love feedback if you have any. |
The issue I have with verifiers is with one of my projects, I'm trying to compare the HAR files across webdriver sessions. To do that I need to persist the request/response information to disk. The approach is similar to VCR. |
Sounds good. Thanks for the insight. 👍 |
Thanks for adding HAR support! |
It'd be nice if one could optionally log request & response bodies. I'm looking for an easy way to dump requests/responses as JSON (ideally HAR).
The text was updated successfully, but these errors were encountered: