`
huobengluantiao8
  • 浏览: 1030863 次
文章分类
社区版块
存档分类
最新评论

为什么脚本化测试不适合新手

 
阅读更多

Why Scripted Testing is Not for Novices

为什么脚本化测试不适合新手

注:这是James Bach的一篇近期blog,我简单翻译了一下,原文链接:

Why Scripted Testing is Not for Novices

…Unless you want bad testing.

为什么脚本化的测试不适合新手。。。除非你想要的是糟糕的测试

Claire Moss writes:

Claire Moss写到:

I am surprised that you say that scripted testing is harder for novice
testers. I would have expected that having so much structure around
the tests would make getting into testing easier for someone with less
experience and that the scripted instructions would make up for a lack
of discipline on the part of the tester.

你说脚本化的测试对新手来说要更难,这让我很惊讶。我原本以为更具结构化的测试,对一个缺乏经验的人而言,会更容易入门,脚本化的指导说明会弥补测试人员在专业规范方面的欠缺。

Structure != “being told what to do”

结构!=”被告知做什么“

First, you are misusing the word “structure.” All testing is structured. If what you mean by structure is “externally imposed structure” then say that. But even if you are not aware of a structure in your testing, it is there. When I tell a novice tester to test, and don’t tell him how to test, he will be dominated by certain structures he is largely unaware of– or if aware he cannot verbalize or control them much. For instance: the user interface look and feel is a guiding structure for novice testers. They test what they see.

首先,你对”结构“的理解是错误的。所有的测试都是结构化的。 如果当你说”结构”时指的是“外部强加的结构”,那么就这样说吧。但即使你在测试时没有注意到什么结构,你的测试中也是有结构存在的。当我让一个新手测试 而不告知他如何去测的时候,他基本上会被那些他没有意识到的特定结构所主导–或者,即使他注意到了,他也无法表达出来或者控制他们。比如,界面的外观和 感觉对新手来说就是一种指导性的结构。他们测试他们所看到的东西。

Cognitive science offer plenty of ideas and insights about the structures that guide our thinking and behavior. See the bookPredictably Irrational by Dan Ariely for more on this.

Scripted testing always has at least two distinct parts: test design and test execution. They must be considered independently.

认知学为指导人们思考和行为的结构提供了大量的思想和见解。更多信息可以看Dan Ariely的这本书《Predictably Irrational》。脚本化的测试总是有两个不同的部分:测试设计和测试执行。必须单独考虑这两个部分。

Scripted test execution is quite a bit more difficult than exploratory testing, unless you are assuming that the tester following the script has exactly the same knowledge and skill as the test designer (even then it is a qualitatively different sort of cognitive process than designing). An exploratory tester is following (indeed forming as he goes) his own intentions and ideas. But, a scripted tester, to do well, must apprehend the intent of the one who wrote the script. Moreover, the scripted tester must go beyond the stated intent and honor the tacit intent, as well– otherwise it’s just shallow, bad testing.

Try using a script to guide a 10 year-old to drive a car safely on a busy city street. I don’t believe it can be done. You can’t overcome lack of basic skills with written instructions.

And sure, yeah, there is also the discipline issue, but that’s a minor thing, compared to the other things.

脚本化的测试执行要比探索性测试难很多, 除非你假设执行脚本的测试人员与设计脚本的测试人员具有完全一样的知识和技能(即使这样,测试执行与测试设计从性质上说是两种不同的认知过程)。探索性测 试人员会跟随(实际上是在测试的时候形成的)他的意图和想法去测试。但,脚本化测试人员,要想做好,必须理解写这个脚本的人的意图。并且,脚本化测试人员 必须超越脚本本身所描述的显式的意图,要去揣摩那些隐式的意图–否则,他的测试将是肤浅的、糟糕的。

尝试用一个脚本指导一个10岁的孩子在繁忙的城市马路上安全的驾驶。我不能相信谁能做到这点。你并不能用详细的指令操作弥补基本技能的不足。对于试图弥补规范性方面,我也同样确信是做不到的。规范性相对其他的一些事情,只是很小的一个方面。

As for scripted test design, that also is a special skill. I can ask my son to put together a computer. He knows how to do that. But if I were to ask him for a comprehensive step-by-step set of instructions to allow me to do it, I doubt the result would help me much. Writing a script requires patience, judgment, and lots of empathy for the person who will execute it. He doesn’t yet have those qualities.

Most people don’t like to write. They aren’t motivated. Now give them a task that requires excellent writing. Bad work generally results.

脚本化的测试设计(就 是指设计测试用例–邰注),那也是一种专项技能。我可以让我的儿子组装一台电脑。他知道如何做这个活。但是如果我让他给我详细地写出操作步骤,以便我按 照这些操作指导就能组装电脑,我怀疑他写的东西究竟会对我有多大帮助。写脚本要求有耐心、判断力、和将来要执行这个脚本的人进行换位思考。他还不具备这些 品质。大多数人都不喜欢写东西。他们没有足够的动力。现在却交给他们一项需要高超写作技巧的任务。他们写出来的东西通常都很糟糕(测试设计的结果通常都不 怎么令人满意–邰注)。

Both on the design side and the execution side, scripted testing done adequately is harder than exploratory testing done adequately. It’s hard to separate an integrated cognitive activity into two pieces and still make it work.

无论从测试设计角度还是从测试执行角度,脚本化的测试,要想做的足够好,都比探索性测试要难。试图把一个综合的认知活动分成两部分,还单独运作得很好,这是很难的。

The reason managers assume it’s simpler and easier is that they have low standards for the quality of testing and yet a strong desire for theappearances of order and productivity.

管理者认为脚本化的测试要比探索性的测试容易,这是因为,他们对测试的质量要求并不高,而对表面上看起来测试是否井然有序以及是否体现了较高的测试生产力,更注重一些。

When I am training a new tester, I begin with highly exploratory testing. Eventually, I will introduce elements of scripting. All skilled testers must feel comfortable with scripted testing, for those rare times when it’s quite important.

当我训练一名测试新手时,我都从高度探索性的测试工作开始。最后,我会介绍一些脚本化测试相关的要素给他。对于那些为数不多的、脚本化的测试是很重要的场合,所有高技能的测试人员必须能够轻松舒适地做脚本化的测试。

Examples

1. Start browser

2. Go to CNN.com

3. Test CNN.com and report any problems you find.

例子

1. 打开浏览器

2. 去CNN.com网站

3. 测试CNN.com网站,报告任何发现的问题

This looks like a script, and it is sort of a script, but the interesting details of the testing are left unspecified. One of the elements of good test scripting is to match the instructions to the level of the tester as well as to the design goal of the test. In this case, no design goal is apparent.

This script does not necessarily represent bad testing– because it doesn’t represent any testing whatsoever.

这看起来像个脚本,它确实是一种脚本,但是所有测试中有趣的细节都未涉及到。好的测试脚本的要素之一就是操作指导与测试人员的水平相匹配、与设计测试的目的相匹配。这个例子中,没有什么明显的测试目的。

这个差的脚本不一定代表着差的测试–因为它并不能代表任何发生的测试活动。

1. Open Notepad

2. Type “hello”

3. Verify that “hello” appears on the screen.

1. 打开记事本

2. 敲入”hello“

3. 验证”hello“是否出现在屏幕上

This script has the opposite problem. It specifies what is completely unnecessary to specify. If the tester follows this script, he is probably dumbing himself down. There may be some real good reason for these steps, but again, the design goal is not apparent. The tester’s mind is therefore not being effectively engaged. Congratulations, designer, you’ve managed to treat a sophisticated miracle of human procreation, gestation, mothering, socializing, educating, etc. as if he were the equivalent of an animated poking stick. That’s like buying an iPad, then using it as a serving tray for a platter of cheese.

这个脚本存 在着相反的另一个问题。它描述了完全没有必要描述的东西。如果测试人员依据脚本测试,很可能会糊涂。也许确实有什么好的理由要这么写脚本吧,但是,测试目 标仍然不清晰。测试人员的大脑因此没有很好的发挥作用。测试设计人员,要恭喜你啦,你已经试图用对待一个动画戳棍的方式来对待一个”经过生育、妊娠、母 爱、社交、教育等一系列过程才产生的这样一个复杂的生命奇迹“。那就像你买了一个iPad,却拿它当奶酪托盘使用一样。

分享到:
评论

相关推荐

    QTP教程(适合新手用,绝对值)

    4.3 参数化测试脚本 29 4.3.1 定义参数 29 4.3.2 修正受到参数化影响的步骤 30 4.3.3 执行并分析使用参数的测试脚本 31 5 输出值 32 5.1 创建输出值 33 5.1.1 输出值类型 33 5.1.2 存储输出值 34 5.2 输出属性值 35 ...

    Jmeter测试搜索功能实战脚本

    此脚本主要讲述csdn搜索功能接口测试,包括搜索关键词参数化处理,通过断言判定搜索结果是否符合要求,并输出测试结果到D盘,适合刚开始接触Jmeter的新手初步了解Jmeter用法

    Python期末考试 测试题

    Python在各个编程语言中比较适合新手学习,Python解释器易于扩展,可以使用C语言或C++(或者其他可以通过C调用的语言)扩展新的功能和数据类型。 [4] Python也可用于可定制化软件中的扩展程序语言。Python丰富的标准...

    xise寄生虫破解版

    更适合新手使用,不仅有可视界面,并带有一键返回网站根目录,让你完全掌握自身方位 支持在4种语言的SHELL内自动生成内页 自动识别服务器编码,自动转码 更适合SEO,模板秒收录秒排名,模板标签功能齐全,能模仿...

    优秀代码编辑器工具 PhpDesigner 8.1.2 Portable 绿色中文免费版.zip

    phpDesigner 不仅是一个功能强大,速度超快的 PHP IDE 和 PHP 编辑器,也是一个功能丰富的 CSS 和 JavaScript 编辑器,它既适合新手也适合经验丰富的开发人员。 phpDesigner 能帮你编辑分析,测试,发布程序和由 php...

    ASP.NET基于C#开发的2D游戏密室寻宝源码+exe可执行文件+项目使用说明(本科毕设).zip

    该资源适合计算机相关专业(如人工智能、通信工程、自动化、软件工程等)的在校学生、老师或者企业员工下载,适合小白学习或者实际项目借鉴参考! 当然也可作为毕业设计、课程设计、课程作业、项目初期立项演示等。...

    java源码包2

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    我当然不清楚ASP/JSP能做些什么。不过明确的是编写那样的代码有多简单,购买它们会有多昂贵以及它们需要多么昂贵和强大的硬件。如果你有什么中立的观点(比如说没有被SUN和Microsoft的百万美金所影响),请顺便通知...

    JAVA上百实例源码以及开源项目

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    JAVA上百实例源码以及开源项目源代码

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    基于Django协同过滤和spark-als的电影推荐系统源码+项目使用说明+设计报告.zip

    本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载使用,也适合小白学习进阶, 或者实际项目借鉴参考! 当然也可作为毕设项目、课程设计、作业、项目初期...

    SiteTeam企业自助建站软件 4.6

    SiteTeam企业自助建站软件是一部专业为搜索引擎营销(网站优化/SEO)而设计,操作极简单,网站极稳定、故障自动修复、在线升级维护、建站速度极快、专为大众上网营销而设计的完全免费开源企业建站系统! SiteTeam企业...

    java源码包---java 源码 大量 实例

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    java源码包3

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    java源码包4

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    成百上千个Java 源码DEMO 4(1-4是独立压缩包)

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    成百上千个Java 源码DEMO 3(1-4是独立压缩包)

    5个目标文件,演示Address EJB的实现,创建一个EJB测试客户端,得到名字上下文,查询jndi名,通过强制转型得到Home接口,getInitialContext()函数返回一个经过初始化的上下文,用client的getHome()函数调用Home接口...

    uboott移植实验手册及技术文档

    #vi Makefile (将 smdk2410修改为 fs2410) #cd ../../include/configs #cp smdk2410.h fs2410.h 退回 U-Boot根目录:#cd ../../ (4)建立编译选项 #vi Makefile smdk2410_config : unconfig @$(MKCONFIG)...

Global site tag (gtag.js) - Google Analytics