tvarchive / optimusTemplate

This is a cucumber jvm implementation template using the optimus mobile automation framework. If you like it, star it, help spread the word.
http://docs.testvagrant.com
66 stars 23 forks source link

Question: Proxy server similar to charles? #48

Open sarathsp23 opened 5 years ago

sarathsp23 commented 5 years ago

Hi, This is not particular to optimus, but thought it would check with you all to see if there are any good alternatives to Charles proxy for re-writing api request and responses? I have been using charles proxy for the same so far, but it is not easy to programmatically modify the request on runtime or re-write the response code as per the test scenarios.

There is mitmproxy-java which does allow me to intercept the messages and read response code, but does not seem to help me with rewriting request body or response code.

Please let me know if you have any suggestions.

Thanks Sarath

thenishant commented 5 years ago

Hey @sarathsp23 Can you tell us the use case for this one, so that we can help you better. 🙂

sarathsp23 commented 5 years ago

Hey @thenishant , My app makes few API calls , currently I use charles to intercept and modify the request or response, to see the behaviour in the app. For example: Say I want to verify that correct error messages is displayed in the app for different error codes. And currently to do this, I use charles proxy (I have to pre-setup for respective tests).

But I want to modify the request or response on runtime programatically. So I have let the test cases modify the request or response based on the scenario.

Thanks Sarath

sarathsp23 commented 5 years ago

@thenishant Hey Nishant, Did you get a chance to go through the use case?