charles-web-side developer practical function points

##Network speed simulation function

The throttle function is very useful for the front end. You can see the performance of the page under low network speed to find out the optimization point.

In the online environment, there are usually some bugs caused by the slow network speed, which cannot be reproduced on the local machine. At that time, it is very blind. If you think that the remote is troublesome, it is recommended to use throttle.

  

  Analyze the meaning of several configurations on the following figure:
  Throttle preset (network speed preset), Bandwidth (bandwidth), Utiliation (utilization percentage), Round-trip (round-trip delay), MTU (bytes)

##Brilliant breakpoint function

Another very useful feature of Charles is an artifact for developers and testers. Charles can interrupt before sending the request (tampering with the Request) and after the request (tampering with the Response).

Scenario: Ajax sends a request. We need to test various boundary conditions of the interface, such as errors and timeouts. Charles' breakpoint + random tampering is very convenient for testing. 


For a request, right-click and select "BreakPoints" to enable breakpoints.

Instead of operating in the web interface, you can use the repeat function to send the same request again.

  

  A breakpoint can be specified for a "get" request or a "post" request.

##Repeat the request

"repeat" sends the request repeatedly.

"repeat Advances" can customize the number of repetitions and repetition interval.

  

##Capture record control

There are too many captured requests and it is easy to cause interference. Charles can filter the captured records.

Then configure "exclude":

 

 

##web interface

Charles has an interesting web interface:

  

 

  Reference for other functions: https://juejin.im/post/5a3b6ab06fb9a0452405fffa

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325545777&siteId=291194637