随笔- 509  文章- 0  评论- 151  阅读- 22万 

2014-04-25 00:35

题目:没有专门的测试工具,你要如何对一个网页进行压力测试?

解法:拼手速,拼电脑数量呗。快捷键+复制粘贴网址,狂搞一番。话说回来,有脚本语言的情况下,直接写个脚本来模拟大量的访问行为肯定是更合理的,手速再快比不过程序。没有工具时,应该想着如何制造工具,而不是赤手空拳去搞。

代码:

复制代码
 1 // 12.4 How would you load test a webpage, if you're not allowed to use any test tools?
 2 // Answer:
 3 //     As far as what I've learned, load testing is a testing method which puts the system under limited resources and exposes it to excessive pressure.
 4 //    1. Browser side:
 5 //        1.a. Use a PC with low configuration, but it must sufficient to see the webpage.
 6 //        1.b. Use various browsers to see their different performances.
 7 //        1.c. Open multiple instances of this webpage, see if it fails to respond.
 8 //    2. Server side:
 9 //        2.a. Deploy the web server on a server(maybe a PC) with low configuration.
10 //        2.b. Try to visit it with multiple clients(many users at the same time).
11 //        2.c. If the system includes some storage, try to fill it up with POST or GET actions on the webpage.
12 int main()
13 {
14     return 0;
15 }
复制代码

 

 posted on   zhuli19901106  阅读(182)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
点击右上角即可分享
微信分享提示