For a beginner QA: useful sniffer functions on the example of Charles Proxy

Sniffers are tools that allow you to intercept, analyze and modernize all requests that pass through them. They are useful when you need to extract some information from a stream or create a desired server response. This is how you can unit test a product that has a back-end, a front-end, and different teams with their own versioning.





In this article, I will talk about the main sniffing functions that can be useful to QA. I will try not to go into theory, but to focus on practice. The most popular representatives of traffic analyzers are now WhireShark, Fiddler and Charles Proxy. We can talk about the convenience of the interfaces and the functionality of each of them for a long time, taking into account all the pros and cons. But here I gave preference to Charles, since I actively use it myself. I will use his example.





Charles Proxy

Charles Web Debugging Proxy - HTTP HTTPS . - ( ) , , .





Charles Proxy - , , - .





Charles Proxy , , . 





, Wi-Fi. Wi-Fi proxy- IP- 8888 ( ).





IP- (ipconfig) Charles Proxy (Help -> Local IP Address).





, Help -> SSL Proxying -> Install Charles Root Certificate on mobile device remote browser.





Charles Proxy HTTP- . HTTPS, - SSL- Charles Proxy .





: chls.pro/ssl (, , Help -> SSL Proxying -> Install Charles Root Certificate on mobile device remote browser). iOS ( -> -> ). 





Android Settings -> Trusted Credentials User. 





, Android 6.0 Androidmanifest , . .





. Help -> SSL Proxying -> Install Charles Root Certificate.





.





Charles Proxy . - , - .





- Structure Sequence.





-. , , , , .. , , . URL, , , .. , , cookie ( ) - HEX.





, . .





Sequence . , , , , .. , , ..





, . ( ). , On / Off.





Charles Proxy . 





Structure. - Filter. . , Focus. Other Hosts. Sequence Focused, , Structure. 





Sequence .





Charles Proxy . Sequence Settings Filter uses regex. .





,  





^\w{4}\.
      
      



, , .





Autoscroll .





Charles Proxy , . Proxy -> Record settings - Include Exclude - .





, -. ( Block list) Tools -> Block list, Enable Block list.





( ):





  • ;





  • 403.





, .





. Block list, . ( Repeat) :





- Failed, , Connection dropped.





SSL-

SSL-, SSL proxying Charles Proxy. .





, Proxy -> SSL Proxying settings SSL Proxying Enable SSL Proxying.





Include Exclude . , .





, Charles Proxy - , . 





Breakpoint . . . 





, (Repeat ). , .





, - header . , Execute Charles Proxy , , . , - Edit response.





, , . ( ) . , - , , API.





Map remote

Charles Proxy - . . Tools -> Map Remote. 





, Import Export. - .





, . dev-, . Map Remote Settings. Map From - ; Map to - .





, , , dev- . , , , .





Map Local

Map Local , , . , .





Rewrite

Rewrite , , Charles Proxy. Rewrite . , . .





Rewrite , , . , , - . , Postman- . Charles, .





Rewrite settings, . , .





cookie ( No caching Block cookies). . , . , cookie .





Throttling

Charles Proxy , . , .





Proxy ->Throttling settings.





, . , . .





Repeat Advanced

, Charles Proxy , . Repeat Advanced ( ) . , .





, Charles Proxy . - IP-, .





, Charles Proxy . . 5-7 , 30 , . , .





Charles Proxy - . , Fiddler-, MacOS, . , - . .





: , .





.





P.S. . VK, FB, Instagram Telegram-, Maxilect.








All Articles