After the two software settings are completed, run the APP product, will there be a crash, and the page display layout is messy
1. Basic knowledge
1. Background of weak network test
- In the era of mobile Internet, users will use our APP under various network conditions. They use 3G or 4G networks, and even use 2G. Now people are more accustomed to follow some news on the way to and from work, look at the stock market, novels, live broadcast, play games and so on. Then there will be a problem, in the subway, on the spit, even in the scenes of elevators, cars and so on. At this time, we need to focus on the running status of the software for these scenarios. And in the weak network environment, there are packet and delay software processing mechanisms. Avoid the loss of users.
2. Test focus
- user experience
In the process of using the APP, the high latency and high packet loss of the weak network, in scenarios with very high real-time requirements, it is easy to hurt the user experience
- Under abnormal circumstances, the probability of bugs will increase
In solving the daily support needs, some users often encounter some bugs that cannot be easily reproduced. A large part of the bugs are due to the fluctuation of the user's own network environment, or the network environment is relatively bad, and the App is in In the face of this harsh network environment, the robustness is not enough, resulting in some unexpected bugs.
3. Weak network test indicators:
- Packet loss
Packet loss should be the most common problem. In the TCP protocol, it is necessary to continuously send requests to confirm the connection status. Once packet loss occurs, it needs to be retransmitted. At this time, you need to check the product's processing mechanism, give any hints, and how to deal with them if there is no response.
- Delay
Delay is also a very common problem. Due to the poor network, network fluctuations have occurred, resulting in jitter in the transmission of data packets. It may cause the request to time out. At this time, you need to give the corresponding prompt, or other processing methods
4. Weak network test tool
- fiddler
- Network Emulator Toolkit
Installation package: Baidu network disk link: https://pan.baidu.com/s/13tEkmGcxuMh8gQIuTLYXVw extraction code: 72iz
5. Network configuration reference
Second, the fiddler tool sets a weak network and captures packets (only delay can be configured)
1. Fiddler setting, restart fiddler after setting
Restart fiddler
2. Take the night god simulator as an example, and set up an agent, the same is true for mobile phones
Path: Settings >> WiFi >> wiredSSID (long press) >> Modify network >> Manual proxy >>
Proxy server: IP address of the computer where fiddler is located (ipconfig)
Question: After setting up the proxy, there is a problem that the certificate is always displayed when opening the browser. You need to install the certificate. Visit: 192.168.0.100:6666 to install the certificate
You can also use other browsers: QQ browser
3. Fiddler configures weak network
Path (Ctrl + R): fiddler toolbar >> Rules >> Customize Rules .. >> Find m_SimulateModem and set the upstream and downstream network parameters
Configure 2G, 3G and other network delays : refer to the up / down delays in the network configuration reference above
- The upstream is: delayed sending every 300 milliseconds, that is, the client sends a request to the server
- The downlink is: download delay 150ms per KB, server download speed
4. Make the configuration effective
勾选:Rules>> Performance >> Simulate Modem Speeds
So far the network delay of fiddler is set
3. Use of Network Emulator Toolkit
- The Network Emulator Toolkit () software just makes a configuration for the local network
Installation: Select the corresponding version according to the above installation package. After installation, you can find the Network Emulator Toolkit in the start menu
1. Set up the network
Select the add button, add a message, and then return
We will see a new filter added to the physical layer where the network card works
2. Add a new circuit
Toolbar >> Configuration >> New link
We will see two lines, up and down, in the same direction
3. Open the upstream settings : select "two lines", right-click >> select Set UpStream
Loss: packet loss
- The second option is a fixed packet loss rate: how many packets lose one packet, such as 0.5, that is 50% packet loss rate
- The third option is random packet loss: how many packets lose one packet, such as 0.5, that is 50% packet loss rate
latency: The third tab represents the upstream latency
4. Open the downstream settings: select "two lines", right-click >> select Set Downstream
Set up
6. Make the configuration effective
- Select Toolbar >> Action >> Start to make the configuration take effect
Fourth, you can also use 360WiFi, set the uplink and downlink parameters in 360WiFi, mobile phone to connect to the computer network
- Just download it yourself
******* Please respect the original, if you want to reprint, please indicate the source: Reprinted from: https://www.cnblogs.com/shouhu/ , thank you! ! *******