fiddler --- Fiddler weak network testing

  Whether it is to do web side or app end of the test, we need to be on the weak network testing, there are many for a weak network methods, such as: Fiddler analog weak network, control speed computers, etc., today how to introduce Fiddler tested weak network

What is weak network

Weak network to see literally means the network is relatively weak, we are known as poor signal, Suman. Now this technological era large number of users will use the APP in subways, tunnels, elevators and garage scene. In this scenario, the network will be delayed, interrupted and a timeout so on.

Hazard weak network

1, in this era belong to a long connection, if we are in Suman location, app will operate very slowly, the page loads it out. For our testers, it is that the user requests the API, API to load more slowly

2, we all like when we brush brush vibrato vibrato on the subway, the next slide when suddenly a page will get stuck, and this is the reason the network caused

3, many bug will show in the case of weak net out activities such as grab coupons, when we are in lots of poor network, we have been repeatedly click buy coupons, but the page is not loaded, the operation resulted in one second simultaneously send multiple requests to the server, the user may grab more than one coupon

The purpose of the test is weak network

Network test weak to have any purpose, be sure to look at our products in case of weak networks, what would happen, identify problems early, allowing developers to network performance under weak case to be targeted optimization

Fiddler control network speed

Analog network speed

1. Start Fiddler, open the menu bar Rules --- Performances --- Simulate Modem Speeds here to open the simulation speed regulation

2, visit a Web site you will find that access will be a bit slow

Specific network speed simulation

1. Start Fiddler, open the menu bar Rules --- Performances --- Simulate Modem Speeds hook

 

2, open Fiddler Script, locate the following code changes

 if (m_SimulateModem) {
     // Delay sends by 300ms per KB uploaded.
     oSession["request-trickle-delay"] = "300";   # 每上传lKB 数据,延时0 3 秒
     // Delay receives by 150ms per KB downloaded.
     oSession["response-trickle-delay"] = "150";   # 每下载lKB 数据,延时0.15 秒

我们通过修还300变成900,150变成600来试试网速,点击保存,我们再次去请求设置Rules---Performances---Simulate Modem Speeds(保存后这里会被取消,再次打开)

另一种方法:

启动fiddler找到Rules---Customize Rules点击打开

弹出来了Fiddler Script页面,同样找到上图代码,修改后点击保存即可

 

找个适合我们再去找个网站进行请求,就会发现请求速度比较慢了。

网络传输数据参考

 一般网络取值的算法就是1000/下载速度=需要延迟的时间( ms ),比如50kbit/s 需要延迟200ms 来接收数据。

 

 

注:测试完成后,请修改回来,不然下次使用的时候网速还是会很慢的 

Guess you like

Origin www.cnblogs.com/qican/p/11325696.html