软件工程实践者的研究方法chapter14cn软件测试策略

上传人:无*** 文档编号:172115457 上传时间:2022-12-01 格式:PPT 页数:31 大小:332KB
返回 下载 相关 举报
软件工程实践者的研究方法chapter14cn软件测试策略_第1页
第1页 / 共31页
软件工程实践者的研究方法chapter14cn软件测试策略_第2页
第2页 / 共31页
软件工程实践者的研究方法chapter14cn软件测试策略_第3页
第3页 / 共31页
点击查看更多>>
资源描述
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 Roger 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 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 slides 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测试的策略性方法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 Pressman.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 are 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 2009).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).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/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 Approach,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 Practitioners 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 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软件发生变更时,软件配置的某些方面(程序、文档或支持数据)也发生变更。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“daily 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 tests 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).Slides copyright 2009 by Roger Pressman.19冒烟测试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 Pressman.20面向对象软件的测试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 Pressman.21Broadening the View of“Testing”These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.22Testing the CRC ModelThese slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.23高阶测试n确认测试n关注软件需求n系统测试n关注系统集成nAlpha/Beta 测试n关注用户使用n恢复测试n通过各种方式强制地让系统发生故障,并验证其能适当恢复n安全测试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 Pressman.24调试:诊断的过程These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.25诊断过程These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.26调试工作These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.27问题&线索These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.28Bugs带来的后果damagemildannoyingdisturbingseriousextremecatastrophicinfectiousBug TypeThese slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.29调试技术蛮干调试法蛮干调试法回溯法原因排除法These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.30纠正错误n这个错误的原因在程序的另一部分也产生过吗?这个错误的原因在程序的另一部分也产生过吗?大多数情况下,程序额错误是由错误的逻辑模式引起的,这种逻辑模式可能会在别的地方出现。n进行修改可能引发的进行修改可能引发的“下一个错误下一个错误”是什么?是什么?在改正错误之前,应该仔细考虑源代码(最好包括设计)以评估逻辑与数据结构之间的耦合。n为避免这个错误,我们首先应当做什么呢?为避免这个错误,我们首先应当做什么呢?这个问题是建立在统计软件质量保证方法的第一步。These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill 2009).Slides copyright 2009 by Roger Pressman.31Final ThoughtsnThink-before you act to correctnUse tools to gain additional insightnIf youre at an impasse,get help from someone elsenOnce you correct the bug,use regression testing to uncover any side effects
展开阅读全文
相关资源
相关搜索

最新文档


当前位置:首页 > 压缩资料 > 基础医学


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!