I need to record sequence of api calls and then stub this sequense again.
For example my scripts going via this proxy to test.com and get response "1" - proxy recording request GET test.com and response "1", then I switching proxy to stub mode with this sequence and when my script call again test.com it getting response from stub.
I not need stub exact url, just queue of responses, if second response will return "2", then queue will be "1","2" and when twice calling test.com I must get 1 and 2 as recorded.
Maybe someone know tools which can do this? I know about charles proxy - but it seems can't do this. Sure it can remote map etc.. but I don't want always manually editing responses.
Open safari and go to chls.pro/ssl and install it. Then on the device go to settings->general->about->Certificate Thrust settings and enable the certificate. Then enable SSL proxy in Charles by going to Proxy tab->SSL proxy and voila. Finally solved it after doing this.
Check the proxy configuration. Open Charles Proxy, if it is not already open. Open your mobile device's browser and navigate to a site. Grant access when prompted that a device is trying to connect to your network. You should now see your mobile device's traffic in your Charles Sequence log.
Viewing Requests Requests appear in the Session window when they are recorded. There are two different ways of viewing the session window: structure view and sequence view. Structure view lets you view the requests in a tree organised by the host name and then folders/directories within the host.
MockServer can be run using the MockServerRule. The MockServerRule starts MockServer ( which now includes the proxy) on a free port before the any test runs and stops MockServer after all tests have completed. An instance of MockServerClient is assigned to any field in the unit test of type org.mockserver.client.MockServerClient.
A guide to identify and solve network related issues in requests or responses during BrowserStack test session, using the Requests Debugger tool.
Before the MockServer Proxy can record any requests it must be started. MockServer is flexible and support numerous usage patterns. programmatically via a Java API in an @Before or @After method using a JUnit @Rule via a @Rule annotated field in a JUnit test from the command line as a stand-alone process in a test environment
A request and its response is the basic element recorded in Charles. HTTP/HTTPS consists of request-response pairs: the request from your computer to the server and the response from the server. For generic sockets the request-response consists of the entire contents of the inbound and outbound streams.
@rst360, at Feather Finance we use Cypress to debug and subsequently automate tests in these kinds of situations.
By default, Cypress will request GET from test.com, but you can save the response from test.com in a fixture file (in Cypress a network stub is called a fixture). Then you can use Cypress's intercept() function to specify which given calls to test.com should be intercepted and responded with a stub.
Here are a few threads on how to use Cypress to stub network responses:
If what you are looking for is a tool to cache your own server's responses, I would suggest using Redis. This article tells you how to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With