by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andy Damevin
    @ia3andy
    (after recording)
    recording-postprocessor
    :)
    Tommy Situ
    @tommysitu
    yeah, it needs a postprocessor
    Andy Damevin
    @ia3andy
    is there an issue I can follow for this?
    Tommy Situ
    @tommysitu
    haven’t got one, do you mind creating it?
    this is the one fore preprocessor: SpectoLabs/hoverfly-java#193
    saggymac
    @saggymac
    @tommysitu thanks for the idea … I spun it up in simulate mode … then did a hoverctl mode simulate —matching-strategy strongest … still no joy.
    saggymac
    @saggymac
    Ok, silly issue … was trying to match a number and using an actual number in the json didn’t match. putting the value in “”, did the trick.
    there’s even bold text in the reference docs I missed " Given a matcher value and string to match,”
    Tommy Situ
    @tommysitu
    is that why it doesn’t work?
    all good then?
    saggymac
    @saggymac
    Yes, I’ll check if I can get spy mode to work in the same way. But yes, I read too much into “exact”. :)
    ok, checked spy mode again, and reordered the pairs in the simulation json to make sure first match wasn’t applying, and its all good.
    Tommy Situ
    @tommysitu
    :thumbsup:
    jonuora
    @jonuora
    Hello
    Running hoverfly in spy mode between my client app and an external service over https
    When my client app connects to the external service without hoverfly, it works
    But when it passes through hoverfly, I see this in the hoverfly logs "Cannot handshake client <hostname:port> remote error: tls: unknown certificate" and the call fails
    jonuora
    @jonuora
    I have seen some answers online about disabling tls verification. I have done this but still have the same issue
    It only works if I set up my http client to accept all certificates but I am hoping I don't have to do that
    saggymac
    @saggymac
    @jonuora I assume you have reviewed this … https://docs.hoverfly.io/en/latest/pages/tutorials/advanced/configuressl/configuressl.html There’s two connections you need to think about … your client to hoverfly, and hoverfly to external service.
    Best practice question … I have some simulation for function / unit testing. I have some for performance simulation. In the case of the latter, I would want to add some log normal delays. Is there a way to parameterize a simulation to enable delays during performance runs; and disable it during functional test runs? Or do folks just keep distinct simulations for each scenario?
    Hans van den Bogert
    @hansbogert
    hi all,
    why does hoverfly use CGO_ENABLED=0 in its releases? This causes all normal logic to choose between netCgo and netGo to be overruled. Is/was there any reason to always choose for netGo? In my case I rely on custom nsswitch modules which are not usable now. (e.g. nss-docker)
    Tommy Situ
    @tommysitu
    Morning @hansbogert, the cgo is disabled since this PR: SpectoLabs/hoverfly#680
    i think it’s to do with smaller binary size. I found this article which has some useful info: https://dave.cheney.net/tag/cgo
    John Davenport
    @JohnFDavenport
    @saggymac Hoverfly doesn’t have a means of switching off delays. Could you perhaps raise an issue to suggest a solution that would work for you?
    @saggymac apologies for the delay responding. Some distractions atm with other matters ...
    mrgaganchohan
    @mrgaganchohan

    Stuck in below problem where Hoverlfy should return only the specific value (not the whole) passed inside query or parameter in response body. I tried below but it’s returning the whole parameter but not just one of the value required.

    This is the request (POST):

    http://localhost:8500/ServiceDetails?filter={"condition":{"a1":"x1","a2":"x2","a3":"x3","a4":"x4"}}

    • Value of a4 (ie. x4) inside filter needs to be passed in response ie values

    I used below method to capture:
    "{{ Request.QueryParam.filter “jsonpath” “$.condition.a4” }}"

    Any idea, why it's not working ?
    lokuseponymous
    @lokuseponymous
    hi everyone,
    i know this doesn't sound terribly useful, but i need to capture http requests that are sent and also received by my local machine.
    is there any way to configure hoverfly to capture these requests?
    John Davenport
    @JohnFDavenport
    What makes you think Hoverfly can’t do that already @lokuseponymous ?
    lokuseponymous
    @lokuseponymous
    well, i'm not getting any output in my simulation.json from those loopback requests, as if the requests never happened. but if i send those same requests to a remote machine, they do show up.
    d-tsu
    @d-tsu
    Hi @tommysitu .
    Could you tell me why hoverfly adds the HTTP header "Req/ Resp"?
    I think this header is probably for confirmation that hoverfly alive, however, some tests will be failed if the application under test can only accept expected request headers.
    Implementation of some kind of the bool flag for default HTTP headers might be useful...?
    (I intend to create pull requests for this issue sometime.)
    3 replies
    Jeff-Beery
    @Jeff-Beery

    Is there a known issue with using the verificationData within a verify() ? I'm seeing that when I try to retrieve the journal entries from the verificationData it is only available intermittently, even when the verify passes.

    For example,

    hoverfly.verify(
    service("someservice")
    .post("someendpoint")
    .anyBody()
    ,(((request, verificationData) -> {
    if (verificationData.getJournal().getEntries().size() > 0) {
    JournalEntry journalEntry = verificationData.getJournal().getEntries().get(0);
    String requestBody = journalEntry.getRequest().getBody();
    }
    }))

    The journal entries sometimes are empty and sometimes have the expected values??

    7 replies
    Kishore Kota
    @kishorekkota
    Can someone help with if it is possible to run Hoverfly Docker image using non root user ?
    6 replies
    Kishore Kota
    @kishorekkota
    I am trying to run Hoverfly Docker image on OCP ( redhat open container platform) platform which is on-prem. My thought was to spin this up for my team - we own several different API that are interacting with may other APIS. I wanted to run this in Proxy mode to capture payload and use that to simulate. I am running some challenges.
    • Our OCP platform only allows Https. I am not sure if running in Proxy mode even possible with the HTTPS is the the only possible option.
    • How to run Hoverfly in debug mode ?
    • I am trying to capture Payloads from Https traffic. When running in Proxy mode - Https terminates at the network level - since it terminates at the edge , i do not think it will need certificates. Can someone advise if my understanding is correct ?
    Stephen Eisenhauer
    @BHSPitMonkey

    Unless I'm missing something in the docs, it seems like there's currently no way to get Hoverfly to recognize two multipart/form-data requests with the same payloads as identical... e.g. curl localhost -F foo=bar; !!, because the request body contains random/nondeterministic form data boundary strings per the HTTP spec.

    Is there a good way to work around that, or would this need to be requested as a new feature?

    2 replies
    Jeff-Beery
    @Jeff-Beery
    From java test code, how do change the middleware scripts that hoverfly service is using? In our build pipeline we have a instance of Hoverfly service that is always running. From the tests we reset the state and apply new simulations using the dsl for each test. I want to explore how to upload and apply middleware scripts to the Hoverfly service from the java test code.
    31 replies
    Jeff-Beery
    @Jeff-Beery
    in the hoverfly middleware scripts can I access the request body? All of the hoverfly middleware examples I can find show how to access the response body from the data read from stdin. In my case I want to modify and return a response body based on analyzing the data in the request body. How do I access the request body in the middleware script?
    16 replies
    sasikumarp04
    @sasikumarp04
    I am running hoverfly with generated certificate locally and changed the mode to capture while making a call to target service in postman to create simulation with proxyHost as localhost and proxyPort as 8500. Getting the following error
    Hoverfly Error!
    There was an error when forwarding the request to the intended destination
    Got error: Post https://url :EOF
    2 replies
    Tytalus
    @tytalus_twitter
    hey I wanted to know if it's possible to modify the state on the middleware for each of the incoming requests? I want to have a map of users where state is saved individually in a key value store for each user and have the state be retrieved from the database and set so that each request executes with the state appropriate for the current user. Thanks!
    8 replies
    Kishore Kota
    @kishorekkota
    Can someone tell me how i can configure Simulation JSON - which allows returning matched results and for the data not found - need it to be forwarded to real API endpoint. I am trying this running Hoverfly as Webserver with Spy mode. However, logs show that it is trying to go to the same URL - I was expecting "destination" in the simulation config to be used for connecting to real API. But do not see this happen. Any sample would be greatly appreciated.
    1 reply
    manish gupta
    @manishprof007_gitlab
    Hey i am new to hoverfly. I have downloaded the latest version of hoverfly on window 10 64 operating system when i am trying to start hoverfly with command 'hoverfly start' it is starting hoverfly but when i am trying to start hoverfly using command "hoverctl Start" it is throwing error "FATA[0000] Could not create a .hoverfly directory"
    can someone please tell me way to resolve this issue
    mytestingithub
    @mytestingithub
    Need help on looping in hoverfly
    i have scenario where i want to get records based on input start and end time , lets say i have my mobile connection recharge history last one month data , The result should be 30 days data with each day date spread across in the response payload ... day1 20/07/2020 -- Data used 2GB, day2 19/07/2020 -- Data used 1.5GB, Day3 18/07/2020 -- Data used 4GB , day4 17/07/2020 -- Data used 2GB...................30 days data can anyone give me solution for this , i couldn't able to find anything in the hover fly documentation
    spradhan
    @spdevhub07
    Is there a way to export simulation with the request and response bodies to be in separate files? After capture - modifying them on a single line with escaped strings is really a task
    John Davenport
    @JohnFDavenport
    @spdevhub07 The simulation editor at https://cloud.hoverfly.io/ is intended for tasks like that