[All dry goods] Mobile phone simulation weak network test-fiddler use

One, install Fiddler

It is said on the Internet to install .NET Framwork4 first. It should be because the machine is already installed, so there is no relevant prompt when installing Fiddler.
Fiddler installation package: telerik.com/download/fi

Second, Fiddler connects to the phone through a proxy

First of all, the computer and mobile phone must use the same wireless network.

  1. Fiddler Tools -> Tab, General

[All dry goods] Mobile phone simulation weak network test-fiddler use

Tab Connections

[All dry goods] Mobile phone simulation weak network test-fiddler use

Note: The fiddler listening port is set to: 8888

  1. You need to install the fiddler certificate.
    Use the mobile browser to visit http://[computer IP address]:[port number set by fiddler], you can download the fiddler certificate and install it.
    The method of checking the computer IP: directly under cmd ipconfig, or mouse over fiddler's online, you can also see the IP address.

[All dry goods] Mobile phone simulation weak network test-fiddler use

  1. Open the mobile phone settings WLAN
    long press the wifi name, select "Manage network settings", check [Show advanced settings], select [Manual] for proxy settings, enter the computer's IP address and port, the port is 8888 set in fiddler
  2. Open the browser web page on the mobile phone, or the APP to be tested, the related address will be obtained in the fiddler software

[All dry goods] Mobile phone simulation weak network test-fiddler use

  1. Modify the parameters to simulate the network speed. After
    using fiddler to connect to the phone through the proxy, go to Fiddler->Rules->Customize Rules, click the pop-up CustomRules.js file, and find m_SimulateModem, which is the following paragraph:

[All dry goods] Mobile phone simulation weak network test-fiddler use

Modify the code as follows:

[All dry goods] Mobile phone simulation weak network test-fiddler use

  1. After confirming that the set parameters are
    set, check Rules -> Performances -> Simulate Modem Speeds

[All dry goods] Mobile phone simulation weak network test-fiddler use

  1. Pay attention to stopping the Internet applications on
    the PC and mobile phones to kill the Internet access processes on the PC and mobile phones. If there are too many Internet applications, the Internet speed will definitely be affected, and the report will be inaccurate.
  2. To capture the packet,
    click on a record in the packet capture data, and the corresponding data of the current interface will be displayed in the statistics on the right. bytes Sent refers to the number of requests sent, Bytes Received: the amount of data returned, and Overall Elapsed: the total time consumed.

[All dry goods] Mobile phone simulation weak network test-fiddler use

three. Fiddler tool instructions

Fiddler starts working, and the captured data packets will be displayed in the list. The following summarizes what these mean:

[All dry goods] Mobile phone simulation weak network test-fiddler use

#: The order of grabbing HTTP Requests , starting from 1, and then increasing
Result: HTTP status code
Protocol: Protocol used by the request, such as HTTP/HTTPS/FTP, etc.
Host: Host name of the requested address
URL: Location of the requested resource
Body: The size of the request
Caching: the requested cache expiration time or the cache control value
Content-Type: the type of the request response
Process: the process that sent the request, the process ID
Comments: allow the user to add notes for this reply
Custom: allow the user to set a custom value .

  1. The statistics tab of Fiddler displays the basic information of the current session. The text information is displayed at the top of the tab, and the bottom is a pie chart. Using the Statistics tab, users can select multiple sessions to get the total information statistics of these sessions, such as multiple requests and the number of bytes transmitted.
    Select the first request and the last request to get the total time consumed by the entire page loading. From the bar chart, you can also distinguish which requests are the most time-consuming, so as to optimize the access speed of the page.
    As follows:

[All dry goods] Mobile phone simulation weak network test-fiddler use

The pie chart is as follows:

[All dry goods] Mobile phone simulation weak network test-fiddler use

The meaning of some information in the Statistics tab is explained as follows:
Request Count: the number of selected sessions;
Unique Hosts: the number of independent target hosts to which traffic flows. If all selected traffic is sent to the same server, this field will not be displayed.
Bytes sent: The total number of bytes sent out in the HTTP request header and request body. The number of bytes in the header and body are given in parentheses.
Bytes received: The number of all bytes received in the HTTP request header and request body. The number of bytes in the request header and request body are given in the parentheses after the total count.
Requests started at: The time point of the first byte of the first request received by Fiddler.
Responses completed at: The time point of the last byte of the last response sent by Fiddler to the client.
Sequence(clock) duration: The "clock time" between the start of the first request and the end of the last response.
Aggregate session duration: The sum of the time from request to response for all selected sessions.
DNS Lookup time: The sum of the time taken by all selected sessions to resolve DNS.
TCP/IP Connect duration: The sum of the time spent in establishing TCP/IP connections for all selected sessions.
HTTPS Handshake duration: the sum of the time spent on HTTPS handshake for all selected sessions.
Response Codes: Select the count of each HTTP response code in the session.
Response Bytes by content-type: Select the number of bytes of each Content-Type response in the session.
Estimated Performance: A preliminary estimate of the time required for the selected traffic in different language (local) regions and connection methods.

Fourth, the actual operation of Fiddler encountered problems and solutions

Problem: Due to the routing reform of the office area, the obtained IP address is automatically changed to a fixed IP, so that when Fiddler connects to the mobile phone, the mobile phone cannot connect to the network and cannot obtain APP requests.
Method:
1. Change the fixed IP to "automatically obtain an IP address"

[All dry goods] Mobile phone simulation weak network test-fiddler use

2. Check the computer IP address, CMD->IP config

[All dry goods] Mobile phone simulation weak network test-fiddler use

3. Enter the IP of the computer you have just checked into the proxy of the phone. This can solve the problem that fiddler cannot connect to the mobile phone to grab the mobile app!

[All dry goods] Mobile phone simulation weak network test-fiddler use

Note: You need to check that the proxy server is set to not use a proxy. Open the Internet option-connection-LAN settings, uncheck the proxy server.

[All dry goods] Mobile phone simulation weak network test-fiddler use

According to the above settings, the app test under the weak network environment can basically be realized~

Guess you like

Origin blog.51cto.com/14972695/2547326