用最简单的方法,做最复杂的测试。

Software Testing - SE By Ron Patton - Why Do Bugs Occur?

上一篇 / 下一篇  2010-10-09 10:43:16 / 个人分类:Translation

Why Do Bugs Occur?

Now that you know what bugs are, you might be wondering why they occur. What you’ll be surprised to find out is that most of them aren’t caused by programming errors. Numerous studies have been performed on very small to extremely large projects and the results are always the same. The number one cause of software bugs is the specification (see Figure 1.1).

FIGURE 1.1Bugs are caused for numerous reasons, but in this sample project analysis, the main cause can be traced to the specification.

为什么会出现软件缺陷?

现在你知道什么是软件缺陷了。你可能还想知道为什么会出现软件缺陷。你会很吃惊的发现,大多数软件缺陷不是因为编程错误导致的。从非常小的项目到极大型的项目的大量研究发现结果都是一样的。引起软件缺陷的首要因素是《软件规格说明书》(参见图1.1

1.1软件缺陷是多种原因造成的,但是在这个演示项目分析中可以看出,首要的原因都可以追溯到《产品规格说明书》。

 

The next largest source of bugs is the design. This is where the programmers lay out their plan for the software. Compare it to an architect creating the blueprints for a building. Bugs occur here for the same reason they occur in the specification. It’s rushed, changed, or not well communicated.

 

NOTE

There’s an old saying, “If you can’t say it, you can’t do it.” This applies perfectly to software development and testing.

接下来引起软件缺陷的最大的原因就是设计。就是程序员给软件架构做具体的设计。好比建筑师给建筑大楼绘制蓝图。这里引起软件缺陷的原因和《产品规格说明书》引起软件缺陷的原因是一样的。需求仓促、需求变更,或者缺乏很好的沟通。

 

注意

俗话说,“如果你无法表达,那你就无法实现。”这句话完全适用于软件开发和软件测试

 

Coding errors may be more familiar to you if you’re a programmer. Typically, these can be traced to the software’s complexity, poor documentation (especially in code that’s being updated or revised), schedule pressure, or just plain dumb mistakes. It’s important to note that many bugs that appear on the surface to be programming errors can really be traced to specification and design errors. It’s quite common to hear a programmer say, “Oh, so that’s what it’s supposed to do. If somebody had just told me that I wouldn’t have written the code that way.”

The other category is the catch-all for what’s left. Some bugs can be blamed on false positives, conditions that were thought to be bugs really weren’t. There may be duplicate bugs, multiple ones that resulted from the same root cause. Some bugs can also be traced to testing errors. In the end, these bugs (or what once were thought of as bugs) turn out to not be bugs at all and make up a very small percentage of all the bugs reported.

如果你是一个程序员,编码错误对你来说再熟悉不过的了。通常,编程错误可以归咎于软件的复杂性、文档的不规范(尤其是当代码被更新或修改过后)、进度压力,或者纯粹是低级的错误。值得注意的是,很多表面上看起来是编程错误,实际上都可以归咎于《产品规格说明书》错误和设计错误。经常会听到程序员说:“哦,所以这就是它应该做的。如果有人告诉我,我的代码就不会这样写了。”

剩下的杂项就被笼统地归为其他类别。有些缺陷可以归咎于误报,被误认为是缺陷的情况其实不是。有些可能是重复的缺陷,以及来源于同一根源的多个缺陷。有些缺陷可能是测试中的错误。总之,这些被证明根本不是缺陷的缺陷(或者说曾经被认为是缺陷的),仅仅占了缺陷报告总数的极小部分。

 

Study Notes:

Catch-all  包罗万象


TAG:

 

评分:0

我来说两句

日历

« 2024-04-16  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 18204
  • 日志数: 46
  • 建立时间: 2010-08-18
  • 更新时间: 2010-10-11

RSS订阅

Open Toolbar