为什么要测试软件?(Why do we test software?)


Software Testing is necessary because the existence of faults in software is inevitable. Beyond fault-detection, the modern view of testing holds that fault-prevention (e.g. early fault detection/removal from requirements, designs etc. through static tests) is at least as important as detecting faults in software by executing dynamic tests.

软件测试是必要的,因为软件存在缺陷是不可避免的。除了缺陷检测,现代测试观点认为缺陷预防(比如:早期缺陷检测/通过静态测试去除需求、设计等中的缺陷)和在软件中执行动态测试进行缺陷检测是一样重要的。

什么是错误、缺陷和失败?(What are errors, faults and failures?)

An error is a human action producing an incorrect result.
The error is the activity undertaken by an analyst, designer, developer, or tester whose outcome is a fault in the deliverable being produced.

错误是人类行为产生的不正确的结果。

错误是由分析人员、设计人员、开发人员或者测试人员输出的可交付成果存在缺陷引起的。

When programmers make errors, they introduce faults to program code. We usually think of programmers when we mention errors, but any person involved in the development activities can make the error, which injects a fault into a deliverable.

当程序员犯错时,他们引入缺陷到程序代码中。当我们提起错误时,我们通常会想到程序员,但是参与开发活动的每个人都可能注入缺陷到交付物中引起错误。

A fault is a manifestation of human error in software.
A fault in software is caused by an unintentional action by someone building a deliverable. We normally think of programmers when we talk about software faults and human error.

缺陷是人为错误在软件中的表现。软件中的缺陷是由建立可交付成果的人的无意识的行为引起的。当我们谈论软件中的缺陷和人为错误时,通常认为这是由程序员引起的。

Human error causes faults in any project deliverable. Faults may be caused by requirements, design or coding errors.

人为错误在项目的任何一个交付物中都会引起缺陷。缺陷则是由需求、设计或者编码错误引起的。

All software development activities are prone to error. Faults may occur in all software deliverables when they are first being written or when they are being maintained.

所有的软件开发活动都容易出错。缺陷可能存在所有的软件交付物中,当他们第一次被写入或者他们被维护时。

A failure is a deviation of the software from its expected delivery or service.
Software fails when it behaves in a different way that we expect or require. If we use the software properly and enter data correctly into the software but it behaves in an unexpected way, we say it fails. Software faults cause software failures when the program is executed with a set of inputs that expose the fault.

失败是软件的预期交付物或者服务与实际存在偏差。

当软件的行为与我们的预期或要求不符时,软件是失败的。如果我们正确地使用软件并且输入正确的数据,但是软件以预期之外的方式运行,我们就认为它是失败的。当程序执行一组引起缺陷的输入时,软件的缺陷就导致了软件的失败。

It is very important to note that not all software faults cause failures and many faults in the software can go unnoticed for a long period of time and may never be found. On the other hand, defect clustering is a characteristic of testing a large software application.

值得注意的是,并不是所有的软件缺陷都会引起失败,很多软件中的缺陷在很长一段时间里都会被忽视,甚至有些缺陷永远不会被发现。另一方面,缺陷集是测试一个大型软件应用程序的特征。

You cannot tell whether software fails unless you know how the software is meant to behave. This might be explicitly stated in requirements or you might have a sensible expectation that the software should not ‘crash’.

                                                                                          文章转载自云端--云端操作系统