首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 系统运维 >

为何脚本化测试不适合新手

2012-09-18 
为什么脚本化测试不适合新手Why Scripted Testing is Not for Novices为什么脚本化测试不适合新手注:这是J

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

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,却拿它当奶酪托盘使用一样。

5楼han_yankun2009前天 08:12
不错额
4楼lishuangzhe70473天前 10:32
your engligh is goodn[e01]
Re: han_yankun2009前天 20:28
回复lishuangzhe7047n呵呵
3楼liutengteng1303天前 10:32
好多啊。你看明白了么?
2楼hejingyuan63天前 10:17
呵呵
1楼hanyankun20093天前 09:52
拼搏
Re: han_yankun20093天前 09:53
回复hanyankun2009n努力

热点排行