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

第二十二章 检验和有效性验证


软件测试. 运行从而观察软件的行为 (动态检 验)
The system is executed with test data and its operational behaviour is observed
2012/3/17
软件工程导论
8
静态和动态V&V
2012/3/17
软件工程导论
9
程序测试
在一次审查中可以发现多个缺陷。而在测试 中,一个缺陷可能掩盖其他的缺陷,所以需 要很多次执行才能发现. 由于域知识和编程技巧等的复用,使得常见 缺陷容易被复查者发现.
2012/3/17
软件工程导论
19
审查和测试
审查和测试是互补而不是竞争的检验技术. 在V&V过程中都应用使用. 审查能检查与需求规格的一致性,但不能检查与客 户真正需求的一直性. 审查不能检查非功能性需求如性能,可用性等.
有效性验证测试Validation testing
Intended to show that the software meets its requirements. A successful test is one that shows that a requirements has been properly implemented.
25
Inspector
Reader Scribe Chairman or moderator Chief moderator
2012/3/17
软件工程导论
检查清单
使用常见错误检查清单来驱动审查. 错误检查清单是与语言相关的,它反映了在该语言 中所特有的一些错误. 通常,弱类型检查的语言会有比较长的检查清单. 例如:初始化,常量命名,循环终止,数组边界等.
能反映存在错误而不是相反. 非功能性需求的唯一验证技术,因为软件只 有很执行后才能看到它的行为. 需要和静态验证技术相结合提供全面的检验 和验证覆盖.
2012/3/17
软件工程导论
10
测试类型
缺陷测试Defect testing
Tests designed to discover system defects. A successful defect test is one which reveals the presence of defects in a system. Covered in Chapter 23
2012/3/17
软件工程导论
6
V & V 信心
依赖于系统的目标,用户期望和市场环境
软件功能
The level of confidence depends on how critical the software is to an organisation.
用户期望值
Users may have low expectations of certain kinds of software.
软件工程—— 第二十二章 检验与有效性验证
2012/3/17
软件工程导论
1
目标
介绍软件检验与有效性验证以及它们之间的区别 程序缺陷审查及其作用 什么是程序的静态分析以及它在检验和有效性验证 中如何使用 程序开发中的净室方法及其有效性的原因
2012/3/17
软件工程导论
2
主要内容
检验和有效性验证规划 软件审查 自动静态分析 净室软件开发方法
2012/3/17
软件工程导论
16
软件测试计划
The testing process A description of the major phases of the testing process. These might be as described earlier in this chapter. Requirements traceability Users are most interested in the system meeting its requirements and testing should be planned so that all requirements are individually tested. Tested items The products of the software process that are to be tested should be specified. Testing schedule An overall testing schedule and resource allocation for this schedule. This, obviously, is linked to the more general project development schedule. Test recording procedures It is not enough simply to run tests. The results of the tests must be systematically recorded. It must be possible to audit the testing process to check that it been carried out correctly. Hardware and software requirements This section should set out software tools required and estimated hardware utilisation. Constraints Constraints affecting the testing process such as staff shortages should be anticipated in this section.
软件工程导论
15
软件测试计划的结构
测试过程The testing process. 需求跟踪Requirements traceability. 测试项目Tested items. 测试时间安排Testing schedule. 测试记录程序Test recording procedures. 软硬件需求Hardware and software requirements. 约束Constraints.
2012/3/17
软件工程导论
22
审查过程
2012/3/17
软件工程导论
23
审查过程
向审查小组概要介绍系统. 代码及相关文档事先发布给审查小组. 进行审查并记录发现的错误. 修正发现的错误. 决定是否要进行重新审查.
2012/3/17
软件工程导论
24
审查过程中的角色
Author or owner The programmer or designer responsible for 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 moderator. Responsible for inspection process improvements, checklist updating, standards development etc.
2012/3/17
软件工程导论
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 buffer overflow? For each conditional statement, is the condition correct? Is each loop certain to terminate? Are compound 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?
相关主题