skinapi 发表于 2005-7-19 00:22:34

Quick Oracle: Blink Testing

文章转自James Bach的Blog
http://blackbox.cs.fit.edu/blog/james/archives/000194.html
我把“Blink Testing”翻译成“火花测试”,就是说通过查看大量的数据或者运行情况,突然产生火花,发现可能存在的问题。

Quick Oracle: Blink Testing
This entry was posted in the following categories: Software Testing and Quality
Background:

In testing, an "oracle" is a principle or mechanism by which we recognize a problem. This contrasts with "coverage", which has to do with getting a problem to occur. All tests cover a product in some way. All tests must include an oracle of some kind or else you would call it a tour rather than a test. (You might also call it a test idea, test activity, or a test case fragment, but not a complete test.)

A book called Blink: The Power of Thinking Without Thinking has recently been published on the subject of snap decisions. I took one look at it, flipped quickly through it, and got the point. Since the book is about making decisions based on little information, I can't believe the author, Malcolm Gladwell, seriously expected me to sit down and read every word.
"Blink testing" represents an oracle heuristic I find quite helpful, quite often. (I used to call it "grokking", but Michael Bolton convinced me that blink is better. The instant he suggested the name change, I felt he was right.)

What you do in blink testing is plunge yourself into an ocean of data-- far too much data to comprehend. And then you comprehend it. Don't know how to do that? Yes you do. But you may not realize that you know how.

You can do it. I can prove this to you in less than one minute. You will get "blink" in a wink.

Imagine an application that adds two numbers together. Imagine that it has two fields, one for each number, and it has a button that selects random numbers to be added. The numbers chosen are in the range -99 to 99.

Watch this application in action by looking at this movie (which is an interactive EXE packaged in a ZIP file) and ask yourself if you see any bugs. Once you think you have it, click here for my answer.

How many test cases do you think that was?
Did it seem like a lot of data to process?
How did you detect the problem(s)?
Isn't it great to have a brain that notices patterns automatically?
There are many examples of blink testing, including:

Page through a long file super rapidly (holding your thumb on the Page Down button, notice the pattern of blurry text on the screen, and look for strange variations in that pattern.
Take a 60,000 line log file, paste it into Excel, and set the zoom level to 8%. Scroll down and notice the pattern of line lengths. You can also use conditional formatting in Excel to turn lines red if they meet certain criteria, then notice the pattern of red flecks in the gray lines of text, as you scroll.
Flip back and forth rapidly between two similar bitmaps. What catches your eye? Astronomers once did this routinely to detect comets.
Take a five hundred page printout (it could be technical documentation, database records, or anything) and flip quickly through it. Ask yourself what draws your attention most about it. Ask yourself to identify three interesting patterns in it.
Convert a huge mass of data to sound in some way. Listen for unusual patterns amidst the noise.
All of these involve pattern recognition on a grand scale. Our brains love to do this; our brains are designed to do this. Yes, you will miss some things; no, you shouldn't care that you are missing some things. This is just one technique, and you use other techniques to find those other problems. We already have test techniques that focus on trees, it also helps to look at the forest.

Posted by james at July 17, 2005 01:43 PM

brilliantking 发表于 2006-4-29 11:11:35

Quick Oracle: Blink Testing
快速准则:火花测试

This entry was posted in the following categories: Software Testing and Quality
本文发表于软件测试专栏和软件质量专栏中

Background:
背景知识:

In testing, an "oracle" is a principle or mechanism by which we recognize a problem. This contrasts with "coverage", which has to do with getting a problem to occur. All tests cover a product in some way. All tests must include an oracle of some kind or else you would call it a tour rather than a test. (You might also call it a test idea, test activity, or a test case fragment, but not a complete test.)
在软件测试中,“准则”是指用以确认问题的一种规则或机制。这有别于“用例覆盖”的概念,后者要做的是怎样让软件出现问题。针对产品的所有测试以某种方法覆盖这个产品,而这些测试里必须包含有某种准则,否则就不能称之为测试,只能说是对软件的游览。(你可以叫它测试思路,测试动作,或测试用例片断,但不能把它叫做完整的测试。)

A book called Blink: The Power of Thinking Without Thinking has recently been published on the subject of snap decisions. I took one look at it, flipped quickly through it, and got the point. Since the book is about making decisions based on little information, I can't believe the author, Malcolm Gladwell, seriously expected me to sit down and read every word.
最近出版了一本讲突发奇想的书,名字叫“灵感:无思之想的力量”。我只随便翻翻,粗看了一下,就明白书里讲什么了。这本书是讲信息很少的情况下怎样做决定的,所以我相信作者Malcolm Gladwell肯定不希望我坐下来慢慢细读的。

"Blink testing" represents an oracle heuristic I find quite helpful, quite often. (I used to call it "grokking", but Michael Bolton convinced me that blink is better. The instant he suggested the name change, I felt he was right.)
我发现“火花测试”是一种非常有用且很常用的有关测试准则的启发式思维。(我曾把这思维叫“神入”,但Michael Bolton让我确信叫灵感更好一些。他把那名字变得那样快,以至我当时感觉他就是对的。)

What you do in blink testing is plunge yourself into an ocean of data-- far too much data to comprehend. And then you comprehend it. Don't know how to do that? Yes you do. But you may not realize that you know how.
做火花测试时,你要把自己置身于数据的海洋——需要领会理解的数据多得不可胜数。然后你就去分析这些数据。不知道怎么去分析吗?不,你知道怎么做。但是你可能不会意识到你明白怎么做。

You can do it. I can prove this to you in less than one minute. You will get "blink" in a wink.
你可以做到的。我可以马上证明给你看。你将在一瞬间得到“灵感”。

Imagine an application that adds two numbers together. Imagine that it has two fields, one for each number, and it has a button that selects random numbers to be added. The numbers chosen are in the range -99 to 99.
假设有一个计算两数之和的程序。这个程序有两个区域,分别对应两个加数,还有一个用来随机选择两个加数的按钮。可选的数的范围是-99到99。

Watch this application in action by looking at this movie (which is an interactive EXE packaged in a ZIP file) and ask yourself if you see any bugs. Once you think you have it, click here for my answer.
通过这个小电影(封装在zip文件里的互动式的EXE文件)来观看这个程序的运行情况。然后自己问自己是否发现了什么bug。一旦你认为你发现了,请点击这里看我的答案。

How many test cases do you think that was?
你觉得会有多少测试用例?

Did it seem like a lot of data to process?
这个程序看起来是否要处理很多数据?
How did you detect the problem(s)?
你是怎样检查出这些问题的?

Isn't it great to have a brain that notices patterns automatically?
有一个可以自动识别类型的大脑是不是很好呢?

There are many examples of blink testing, including:
有很多火花测试的例子:

Page through a long file super rapidly (holding your thumb on the Page Down button, notice the pattern of blurry text on the screen, and look for strange variations in that pattern.
极快地去游览一个长文件(用手指一直按着下翻页键),注意屏幕上出现地虚文本的样子,同时注意寻找样子有没有奇怪的变化。

Take a 60,000 line log file, paste it into Excel, and set the zoom level to 8%. Scroll down and notice the pattern of line lengths. You can also use conditional formatting in Excel to turn lines red if they meet certain criteria, then notice the pattern of red flecks in the gray lines of text, as you scroll.
找一个6万行的日志文件,把里面的文本粘贴到Excel中去,然后把显示比例设为8%,向下滚动,并注意观察行的长度。 你也可以用Excel里的条件格式满足某些条件的行的文字变成红色,然后在滚动文本时,注意观察红色行闪烁于灰色行之间的情形。

Flip back and forth rapidly between two similar bitmaps. What catches your eye? Astronomers once did this routinely to detect comets.
在两个相似的位图间快速地翻来翻去,你的眼里出现了什么?天文学家曾经遵循这种方法去发现彗星。

Take a five hundred page printout (it could be technical documentation, database records, or anything) and flip quickly through it. Ask yourself what draws your attention most about it. Ask yourself to identify three interesting patterns in it.
找一个五百页的印刷品(可以是技术文档,数据库记录或是其他什么)然后快速翻页,问问自己里面的哪些东西最吸引你的注意力,找出其中三个吸引你的地方。

Convert a huge mass of data to sound in some way. Listen for unusual patterns amidst the noise.
用某种方法把一批海量的数据转成声音,然后找一找噪声里的不同寻常的东西。

All of these involve pattern recognition on a grand scale. Our brains love to do this; our brains are designed to do this. Yes, you will miss some things; no, you shouldn't care that you are missing some things. This is just one technique, and you use other techniques to find those other problems. We already have test techniques that focus on trees, it also helps to look at the forest.
宽泛地说,这些例子里都包含有模式识别的学问。我们的大脑喜欢进行模式识别。我们的大脑天生就是做这个的。是的,你将忘掉一些东西,同时,你不应该注意到你正在忘掉一些东西。这只是一种技巧,就如同你用其他的技巧找到其他的问题一样。我们已经拥有了针对树木的测试技巧,这也将有助于检视整个森林。

skinapi 发表于 2006-4-29 22:59:28

加分再次鼓励,呵呵。

brilliantking 发表于 2006-4-30 08:57:23

谢谢!感觉自己的专业知识太少了,译起来很吃力,文不达意的地方很多:(

李逍遥 发表于 2006-6-12 18:05:15

楼上的也太谦虚啦!我好羡慕啊!

wxq8102 发表于 2007-5-13 00:03:14

是啊,太谦虚了,十分感谢两位!

happy1tian 发表于 2007-6-12 16:49:08

翻译是不错的。不过关于这个blink testing,用的例子好象并不多啊
页: [1]
查看完整版本: Quick Oracle: Blink Testing