《软件工程实践者的研究方法chapter14cn软件测试策略.ppt》由会员分享,可在线阅读,更多相关《软件工程实践者的研究方法chapter14cn软件测试策略.ppt(31页珍藏版)》请在优知文库上搜索。
1、These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill,2009).Slides copyright 2009 by Roger Pressman.1第十四章n软件测试策略软件测试策略Slide Set to accompanySoftware Engineering:A Practitioners Approach,7/e by Roger S.PressmanSlides copyright 1996,2001,2005,2009 by Roge
2、r S.PressmanFor non-profit educational use onlyMay be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering:A Practitioners Approach,7/e.Any other reproduction or use is prohibited without the express written permission of the author.All copyright
3、 information MUST appear if these slides are posted on a website for student use.These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.2软件测试测试是在程序发布给最终用户之前,执测试是在程序发布给最终用户之前,执行程序以发现错误的过程。行程序以发现错误的过程。.These sl
4、ides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.3测试展示了These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.4测试的策略性方
5、法n为完成有效的测试,软件团队应该进行有效的、正式的技术评审。通过评审,许多错误可以在测试开始之前排除。n测试开始于构件层,然后向外“延伸”到整个基于计算机系统的集成。n不同的测试技术适用于不同的时间点。n测试由软件开发人员和(对大型项目而言)独立的测试组执行。n测试和调试是不同的活动,但任何测试策略中都必须包括调试。These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pr
6、essman.5验证与确认(V&V)n验证是指确保软件正确地实现某一特定功能的一系列活动。n确认则指的是确保开发的软件可追溯到用户需求的另外一系列活动。BOE81用另一种方式说明了这两者的区别:n验证:我们在正确地构造产品吗?n确认:我们在构造正确的产品吗?These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.6由谁来测试软件?These slides ar
7、e designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.7测试策略系系统统工程工程分析模型分析模型设计设计模型模型编码编码单单元元测试测试集成集成测试测试确确认测试认测试系系统测试统测试These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 20
8、09).Slides copyright 2009 by Roger Pressman.8测试策略n测试从“小规模”开始,进展到“大规模”。n传统软件测试n关注测试单个构件或相关的一小组构件n构件集成测试n面向对象软件的测试n测试目标就是在现实的时间范围内利用可控的工作量尽可能多地找到错误。对于面向对象软件,尽管这个基本目标是不变的,但面向对象软件的本质特征改变了测试策略和测试战术。These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).
9、Slides copyright 2009 by Roger Pressman.9Strategic Issuesn早在开始测试之前,就要以量化的方式规定产品需求。n明确地陈述测试目标n了解软件的用户并为每类用户建立用户轮廓。n建立强调”快速周期测试“的测试计划。n建立能够测试自身的“健壮”软件n测试之前,利用有效的正式技术评审作为过滤器。n实施正式技术评审以评估测试策略和测试用例本身。n为测试过程建立一种持续的改进方法。These slides are designed to accompany Software Engineering:A Practitioners Approach,7/
10、e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.10单元测试These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.11单元测试These slides are designed to accompany Software Engineering:A Practitioners Appro
11、ach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.12单元测试环境These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.13集成测试策略These slides are designed to accompany Software Engineering:A Practitio
12、ners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.14自顶向下集成These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.15自底向上集成These slides are designed to accompany Software Engineering:A
13、 Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.16混合方式测试These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.17回归测试n回归测试是重新执行已进行测试的某个子集,以确保变更没有传播不期望的副作用。n软件发生变更时,软件配置的某
14、些方面(程序、文档或支持数据)也发生变更。n回归测试有助于保证变更(由于测试或其他原因)不引入无意识行为或额外的错误。n回归测试可以手工进行,方法是重新执行所有测试用例的子集,或者利用捕捉、回放工具自动进行。These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.18Smoke TestingnA common approach for creating“da
15、ily builds”for product softwarenSmoke testing steps:nSoftware components that have been translated into code are integrated into a“build.”A build includes all data files,libraries,reusable modules,and engineered components that are required to implement one or more product functions.nA series of tes
16、ts is designed to expose errors that will keep the build from properly performing its function.The intent should be to uncover“show stopper”errors that have the highest likelihood of throwing the software project behind schedule.nThe build is integrated with other builds and the entire product(in its current form)is smoke tested daily.The integration approach may be top down or bottom up.These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Sl