2014-04-25 00:35

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

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

代码:

 // 12.4 How would you load test a webpage, if you're not allowed to use any test tools?
// Answer:
// 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.
// 1. Browser side:
// 1.a. Use a PC with low configuration, but it must sufficient to see the webpage.
// 1.b. Use various browsers to see their different performances.
// 1.c. Open multiple instances of this webpage, see if it fails to respond.
// 2. Server side:
// 2.a. Deploy the web server on a server(maybe a PC) with low configuration.
// 2.b. Try to visit it with multiple clients(many users at the same time).
// 2.c. If the system includes some storage, try to fill it up with POST or GET actions on the webpage.
int main()
{
return ;
}

《Cracking the Coding Interview》——第12章:测试——题目4的更多相关文章

  1. Cracking the coding interview 第一章问题及解答

    Cracking the coding interview 第一章问题及解答 不管是不是要挪地方,面试题具有很好的联系代码总用,参加新工作的半年里,做的大多是探索性的工作,反而代码写得少了,不高兴,最 ...

  2. 《Cracking the Coding Interview》读书笔记

    <Cracking the Coding Interview>是适合硅谷技术面试的一本面试指南,因为题目分类清晰,风格比较靠谱,所以广受推崇. 以下是我的读书笔记,基本都是每章的课后习题解 ...

  3. Cracking the coding interview

    写在开头 最近忙于论文的开题等工作,还有阿里的实习笔试,被虐的还行,说还行是因为自己的水平或者说是自己准备的还没有达到他们所需要人才的水平,所以就想找一本面试的书<Cracking the co ...

  4. Cracking the coding interview目录及资料收集

    前言 <Cracking the coding interview>是一本被许多人极力推荐的程序员面试书籍, 详情可见:http://www.careercup.com/book. 第六版 ...

  5. Cracking the Coding Interview(Trees and Graphs)

    Cracking the Coding Interview(Trees and Graphs) 树和图的训练平时相对很少,还是要加强训练一些树和图的基础算法.自己对树节点的设计应该不是很合理,多多少少 ...

  6. Cracking the Coding Interview(Stacks and Queues)

    Cracking the Coding Interview(Stacks and Queues) 1.Describe how you could use a single array to impl ...

  7. 《Cracking the Coding Interview》——第12章:测试——题目6

    2014-04-25 00:53 题目:你要如何测试一个分布式银行系统的ATM机? 解法:ATM是Automatic Teller Machine,取钱的.我想了半天,没找到什么很清晰的思路,也许是因 ...

  8. 《Cracking the Coding Interview》——第12章:测试——题目5·

    2014-04-25 00:41 题目:怎么测试一支笔?(Pen?您老说的是钢笔?) 解法:这种简约而不简单的题目,实在是面试官最喜欢,面试者最头疼的类型了.面试官可以只花三秒,以一种灰常高贵冷艳的语 ...

  9. 《Cracking the Coding Interview》——第12章:测试——题目3

    2014-04-24 23:28 题目:玩象棋游戏,你要设计一个bool型的方法来检测一个棋子能否移动到指定位置. 解法:不同的棋子有不同的移动规则,那么应该采取棋子基类实现接口,各个棋子子类来实现的 ...

随机推荐

  1. ubuntu 显示隐藏文件

    原文链接 http://blog.csdn.net/happyjiahan/article/details/6023496 方法1.使用命令ls -a显示所有的文件,包括隐藏文件 方法2.在桌面化操作 ...

  2. 利用PCHunter结束各种进程

    http://www.epoolsoft.com/ 经测试,可结束主动防御等.

  3. May 05th 2017 Week 18th Friday

    No matter what have happened today, the sun will just rise in the morning of tomorrow. 无论今天发生了什么,明天早 ...

  4. IOS 读取xib里的子控件

    interface ViewController () /**获取.plist数据*/ @property (nonatomic,strong) NSArray *aps; @end @impleme ...

  5. MYSQL 之SET GLOBAL innodb_buffer_pool_size =n

    工作遇到一个情况是索引相同的情况下,mysql服务在linux上运行很快,在windows服务器上运行很慢,版本是V5.7以后得版本,同事查找了下说应该设置 SET GLOBAL innodb_buf ...

  6. 软件的依赖关系:类图关系:is-a has-a use-a

    基本描述: 类图关系:is-a has-a use-a: 依赖规则: 依赖倒置: 依赖注入: 接口隔离: 无环依赖: 稳定依赖: 依赖倒置描述: 底层抽象-->高层抽象 ^          ^ ...

  7. python_1_变量的使用

    print("hello word") name="Qi Zhiguang" print("My name is",name) name2= ...

  8. typeid操作符

    typeid() operator返回type_info,返回值不可拷贝.不可赋值 // Illustrates the typeid operator. #include <iostream& ...

  9. Webpack4 学习笔记二 CSS模块转换

    前言 此内容是个人学习笔记,以便日后翻阅.非教程,如有错误还请指出 webpack 打包css模块 webpack是js模块打包器, 如果在入口文件引入css文件或其它的less.sass等文件,需要 ...

  10. 解题:在下面画线的地方填任何代码,使得最终输出 'hello world',至少写五个不同思路的方案

    今天(已经好些天前了...),群里面(JS前端开发跳板6群[81501322])有个群友问了这样一个问题. 如题:在下面画线的地方填任何代码,使得最终输出 'hello world',至少写五个不同思 ...