万古神帝笔下文学:谁能帮忙翻译下这篇计算机文章?

来源:百度文库 编辑:高校问答 时间:2024/04/28 13:35:31
7 Program testing/debugging
7.1 Introduction
Although many authors attempt to draw a distinction between testing and debugging a program, in practical terms they amount to the same thing. Consequently, the term testing is used to cover this procedure.
Testing is the process of executing a program with the deliberate intent of finding errors. This definition is important because it specifies a state of mind on the part of the person performing the test. It is akin to the engineering practice of testing a mechanism or structure not only to verify that it can perform its designed task under ideal conditions but also to determine the point (if any) at which it fails.

7.2 Testing in its correct perspective
Diligent and exhaustive testing is no substitute for careful design. The time taken to test a program to satisfaction will be in proportion (with an inverse ratio) to the time taken in designing the program before its coding. Days spent in design will save weeks in testing.
The elegance of design of any program will directly affect both the ease of testing the program and the incidence of errors detected. Errors will not be referred to as ‘bugs’ because gracing them with a euphemism makes it easier for us as programmers to ignore the fact that they are errors. They are faults in the execution of a program which have been induced by the programmer through poor design or incorrect logic.
Most errors are the result of incorrect control functions in programs rather than incorrect computation or data manipulation. The latter types of error are usually the easiest to detect and correct; the former often go undetected and remain in programs after they have been approved to run in a production (or ‘live’) environment. Control functions are those which regulate the sequence in which tasks are performed, the selection of appropriate processing modules for a given situation, the number of times a loop is executed, and so on.

我的翻译如下,请参考:

7、程序测试/调试
7.1 导论
虽然许多著书者都试图在测试与调试程序之间进行区别,但是在实际操作中,这两者都指的一件事。因此,(我们)用“测试”一次用来代表这一过程。
测试就是用运行程序以发现错误。这个定义很重要,因为它指定了执行测试的人的头脑状态。这就像测试一台机器或建筑物那样的工程实践一样,目的不只是要证明它能在所有设想的条件下完成既定任务,还要找出它在什么情况下就不能完成任务。

7.2在正常情况下测试
用心和彻底的测试并不是仔细设计的替代品。用于测试直到满意的时间与用于在编码前编程的时间是成反比的。花在编程上的时间越多,测试所需时间就越少。
程序编得是否完美直接关系到测试程序费力是否费力以及错误的影响范围。错误不能理解为缺陷,因为对缺陷的修复往往使我们这些程序员忽视他们使错误的事实。错误就是由于程序员的糟糕设计或是错误逻辑导致的程序运行时的缺点。
许多错误是控制函数中的不正确引起的,而不是错误计算或是错误的数据操作引起的。后面这种错误往往很容易检测到并得到纠正,但前面那种错误经常不能检测到,而且在经批准生产后还存在于程序中。控制函数指的是对以下各项的控制:实施任务的顺序、在所给条件下对合适的处理模块的选择、循环次数等等。

7测试计划/调试 采用7.1 尽管许多作者试图区分测试和调试节目,实际上他们是息息相关的. 因此,这个词是用于测试这个程序. 试验是在计划执行过程中故意寻找错误. 这是很重要的,因为它确定了明确的精神状态做好人的考验. 这是类似的工程实践检验的机制和体制,不仅证实能发挥设计的理想条件下工作,而且确定了点(如有),它失败. 7.2测试在正确的位置 勤劳详尽地设计试验,别无他法. 时间考验满意计画将部分(有逆比率)的时间,设计规划之前编码. 天设计可节省周试验. 任何计划的设计展将直接影响双方方便的测试计划发现,发生错误. 错误不会被称为'虫'的说法,因为他们时时刻刻方便我们编程忽略他们的错误. 他们是在执行一项计画断层所引发的不良透过程式设计错误或逻辑. 最错误的原因是不正确的控制功能或数据计算错误,而不是程序操作. 后者通常是最容易发现错误和纠正; 前者往往是在节目后,疫情已批准的生产经营(或'活')环境. 控制功能则是指规范的顺序进行任务,选择适当的处理单元具体情况,有多次性执行等.