当前位置:文档之家› 检验和有效性验证

检验和有效性验证



检验和有效性验证要确立软件系统达到设计目 标的信心. 这并不意味着完全没有缺陷. 相反,它必须足够用于其预定用途和根据所使 用类型确定所需要的信任程度 .
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 6
V & V 可信度

依赖于系统目标, 用户期望值和市场环境
检验和有效性验证
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 1
目标


软件检验和软件有效性验证之间的区别; 在程序中发现缺陷的程序审查方法; 什么是程序的静态分析以及它在检验和有效性验证中 如何使用; 程序开发中的净室(cleanroom)方法及其有效性的 原因
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 24
审查角色
Author or owner The programmer or designer responsible fo r producing the program or document. Responsible for fixing defects discovered during the inspection process. Finds errors, omissions and inconsistencies in programs and documents. May also identify broader issues that are outside the scope of the inspection team. Presents the code or document at an inspection meeting. Records the results of the inspection meeting. Manages the process and facilitates the inspection. Reports process results to the Chief mo derator. Responsible for inspection process imp rovements, checklist updating, standards development etc.
Slide 4
V & V 过程


是否为整个生命周期过程 - V & V 必须应用于 软件周期的各个阶段中. 两个主要目标
• • 发现系统中的缺陷; 评估在操作情况下系统可用性与有用性.
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 5
V& V 目标
• • • 软件功能
• 系统需要的信任程度取决于该软件在机构中的重要程度.
用户期望值
• 用户可能对某些软件的期望值很低.
市场环境
• 让产品早日上市也许比发现产品中的缺陷更重要。
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 7
静态检验和动态检验
Slide 20
程序审查


文件检查的正确方式 拟明确规定缺陷检测(而不校正). 缺陷可能是逻辑错误,在代码中可能显示一个 错误的异常状态(如一个未初始化的变量)或 不符合标准.
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 21
审查先决条件
陈江平
Software Engineering, 8th edition. Chapter 22
Sl和有效性验证规划 软件审查 自动静态分析 净室软件开发
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 3
检验 vs 有效性验证
Inspector
Reader Scribe Chairman or mo derator Chief mo derator
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 25
审查清单



应有一份常出的错误清单来引导审查. 错误清单依赖于编程语言并反映语言中可能会 出现的特征错误. 一般来说,较“弱”的类型检查对应了较大的 清单. 例子:初始化,常量命名,循环终止,数组界 限,等.
Slide 19
审查和测试



审查和测试时互补的,而不是相互对立的检验 手段. 在V & V过程中两者都需要用到. 审查可以检验规范定义的一致性,但是不能检 验用户真实需求的一致性. 审查不能检验非功能特征,如性能,可用性等.
陈江平
Software Engineering, 8th edition. Chapter 22




必须要有一个精确的可用说明书. 团队成员必须对组织标准非常熟悉. 必须有语法正确的代码或者其他系统表示. 应准备错误清单. 在软件过程的早期,管理人员必须接受审查会 增加成本的事实. 不应该使用审查来考核工作人员,如查找谁犯 了错误等.
陈江平
Software Engineering, 8th edition. Chapter 22
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 12
调试过程
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 13
V & V 规划


仔细规划能从程序检查和测试中得到更多的回 报. 规划应该从开发过程早期就开始着手. 规划应该考虑静态检验和测试之间的平衡. 对测试规划主要是制定测试过程标准,而不是 描述产品测试.
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 26
程序审查内容1
Data faults Are all program variables initialised before their values are used? Have all constants been named? Should the upper bound of arrays be equal to the size of the array or Size -1? If character strings are used, is a de limiter explicitly assigned? Is there any possibility of b uffer overflow? For each conditional statement, is the condition correct? Is each loop certain to terminate? Are comp ound statements correctly bracketed? In case statements, are all possible cases accounted for? If a break is required after each case in case statements, has it been included? Are all input variables used? Are all output variables assigned a value before they are output? Can unexpected inputs cause corruption?

软件审查. 对静态系统的表示进行分析来发现 问题 (静态检验)
• 如需求文档、设计图表和程序源代码等

软件测试. 对产品的输出和它的操作行为来测 试 (动态测试)
• 使用测试数据来执行软件,观察它的行为和输出
陈江平
Software Engineering, 8th edition. Chapter 22
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 16
软件测试计划
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 17
软件审查




包括对软件系统(一般是源代码)进行复查来 发现异常和缺陷. 审查可以在系统执行前进行,因为它不需要执 行系统. 它们可以应用于任何的系统表示中 (需求, 设 计,配置数据, 测试数据, 等等.). 它已被证明是一种发现程序错误的有效技术.
Slide 22
审查过程
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 23
审查过程



系统概述提交给审查组. 最新的、语法正确的代码版本发给所有团队成 员. 进行审查并记录错误. 改正已经发现的错误. 视情况决定再审查是否必要.
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 14
开发过程的V模型
陈江平
Software Engineering, 8th edition. Chapter 22
Slide 15
相关主题