Giter Site home page Giter Site logo

Comments (6)

admtnnr avatar admtnnr commented on May 5, 2024

Thanks for the issue! 👍

I've updated the docs to reflect some recent changes in log.Logger that enable it to log message bodies, optionally dechunking and decompressing them so that they are readable in the log output.

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.

from martian.

bootstraponline avatar bootstraponline commented on May 5, 2024

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.

from martian.

admtnnr avatar admtnnr commented on May 5, 2024

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.

from martian.

bootstraponline avatar bootstraponline commented on May 5, 2024

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.

from martian.

admtnnr avatar admtnnr commented on May 5, 2024

Sounds good. Thanks for the insight. 👍

from martian.

bootstraponline avatar bootstraponline commented on May 5, 2024

Thanks for adding HAR support!

from martian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.