首页 > 其他 > 详细

MOOCTEST_基础课程_PIE模型

时间:2020-02-18 22:14:56      阅读:85      评论:0      收藏:0      [点我收藏+]

Software Fault: A static defect in the software(i.e.,defect) “缺陷”——Execution

Software Error: An incorrect internal state that is the manifestation of some faults.

        ”错误的中间状态“——Infection

Software Failure: External, incorrect behavior with respect to the requirements or other         description of the expected behavior."失效“——Propagation

PIE Model

  • Execution/Reachability:The location or locations in the program that contain the fault must be reached.
    •   A  test may not execute the location of the fault.(控制流调用较为复杂)
  • Infection 感染: The state of the program must be incorrect.
    •   A test executing the fault may not produce an error.(结果相同)
  • Propagation 传播: The infected state must propagate to cause some output of the program to be incorrect.
    •   An error may not be propagated to the output.(结果相同)

例如:

一个程序用for循环求数组和,并且求均值,但i错误的从1开始。——此时对应Fault

当程序运行后,程序将数组第一个数据跳过。——此时对应Error

程序运行结束,输出结果错误。——此时对应Failure

但是,这三种情况有时不会显而易见。

Fault. 当程序复杂时,如果程序没有运行到错误的地方则无法发现Fault。

Error. 按照上例,如数组0 4 5,求和、均值结果正确,并不会产生Error。

Failure. 按照上例,如数组4 3 5,求和发生Error,但均值没有错误,属于No Failure.

MOOCTEST_基础课程_PIE模型

原文:https://www.cnblogs.com/Comet-Fei/p/12328951.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!