Hi Team, I’m trying to use Mock with enable brows...
# help
d
Hi Team, I’m trying to use Mock with enable browser-proxy feature . Below is my mock start up command, value: --port 10080 --ca-keystore /var/wiremock/lib/ca-keystore.jks --enable-browser-proxying --trust-all-proxy-targets --print-all-network-traffic --bind-address 0.0.0.0 Step 1 : start mock server using below API https://mock-server/__admin/recordings/start Step : 2 Execute the service having mock server as a proxy Step 3 : Stop the mock server using below API https://mock-server/__admin/recordings/stop When I stop the recording, I was expecting the data to be available under mappings directory but I don’t see any data. I do see the data captured in admin/requests but I don’t see that in admin/mappings https://mock-server/admin/requests Please Help.
r
are you getting a successful response when calling
/__admin/recordings/start
?
the recording feature is different to the browser proxy feature. the recording feature forwards all requests to the specified single target, whereas browser proxying is for proxying arbitrary requests to an address from a client like a browser through a wiremock server. more detail of both feature can be found here and here
d
@Rafe Arnold - I’m getting successful response when I call this endpoint
/__admin/records/start
? I understand that briwser proxying feature capture arbitrary requests but when the req/res captured in request logs then it has to be in mappings too right?
r
sorry i meant to type
/__admin/recordings/start
in my original reply. yes, i would expect the mappings to be present in the mappings directory
how are you running wiremock? in a docker container?
d
@Rafe Arnold - Sorry for the delayed response. I was able to figure out what’s going on and fixes the issues. Thanks again for the support!!