《软件工程-实践者的研究方法》chapter-14-cn-软件测试策略_第1页
《软件工程-实践者的研究方法》chapter-14-cn-软件测试策略_第2页
《软件工程-实践者的研究方法》chapter-14-cn-软件测试策略_第3页
《软件工程-实践者的研究方法》chapter-14-cn-软件测试策略_第4页
《软件工程-实践者的研究方法》chapter-14-cn-软件测试策略_第5页
已阅读5页,还剩26页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill,2009).Slidescopyright2009byRogerPressman.,1,第十四章,软件测试策略,SlideSettoaccompanySoftwareEngineering:APractitionersApproach,7/ebyRogerS.PressmanSlidescopyright1996,2001,2005,2009byRogerS.PressmanFornon-profiteducat

2、ionaluseonlyMaybereproducedONLYforstudentuseattheuniversitylevelwhenusedinconjunctionwithSoftwareEngineering:APractitionersApproach,7/e.Anyotherreproductionoruseisprohibitedwithouttheexpresswrittenpermissionoftheauthor.AllcopyrightinformationMUSTappeariftheseslidesarepostedonawebsiteforstudentuse.,T

3、heseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,2,软件测试,测试是在程序发布给最终用户之前,执行程序以发现错误的过程。.,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressma

4、n.,3,测试展示了,错误,需求一致性,性能,质量,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,4,测试的策略性方法,为完成有效的测试,软件团队应该进行有效的、正式的技术评审。通过评审,许多错误可以在测试开始之前排除。测试开始于构件层,然后向外“延伸”到整个基于计算机系统的集成。不同的测试技术适用于不同的时间点。测试由软件开发人员和(对大型项目而言)独立的测试组执行。测试和调

5、试是不同的活动,但任何测试策略中都必须包括调试。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,5,验证与确认(V&V),验证是指确保软件正确地实现某一特定功能的一系列活动。确认则指的是确保开发的软件可追溯到用户需求的另外一系列活动。BOE81用另一种方式说明了这两者的区别:验证:我们在正确地构造产品吗?确认:我们在构造正确的产品吗?,Theseslidesaredesigne

6、dtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,6,由谁来测试软件?,开发者,独立的测试人员,Understandsthesystem,but,willtestgently,and,isdrivenbydelivery,Mustlearnaboutthesystem,but,willattempttobreakit,and,isdrivenbyquality,Theseslidesaredesignedtoaccompa

7、nySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,7,测试策略,系统工程,分析模型,设计模型,编码,单元测试,集成测试,确认测试,系统测试,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,8,测试策略,测试从“小规模”开始,进展

8、到“大规模”。传统软件测试关注测试单个构件或相关的一小组构件构件集成测试面向对象软件的测试测试目标就是在现实的时间范围内利用可控的工作量尽可能多地找到错误。对于面向对象软件,尽管这个基本目标是不变的,但面向对象软件的本质特征改变了测试策略和测试战术。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,9,StrategicIssues,早在开始测试之前,就要以量化的方式规定产品需求

9、。明确地陈述测试目标了解软件的用户并为每类用户建立用户轮廓。建立强调”快速周期测试“的测试计划。建立能够测试自身的“健壮”软件测试之前,利用有效的正式技术评审作为过滤器。实施正式技术评审以评估测试策略和测试用例本身。为测试过程建立一种持续的改进方法。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,10,单元测试,测试模块,测试用例,结果,软件工程师,Theseslidesare

10、designedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,11,单元测试,接口,局部数据结构,边界条件,独立路径,错误处理路径,测试模块,测试用例,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,12,

11、单元测试环境,被测模块,桩模块,桩模块,驱动程序,结果,接口,局部数据结构,边界条件,独立路径,错误处理路径,测试用例,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,13,集成测试策略,Options:the“bigbang”approachanincrementalconstructionstrategy,TheseslidesaredesignedtoaccompanySo

12、ftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,14,自顶向下集成,topmoduleistestedwith,stubs,stubsarereplacedoneat,atime,depthfirst,asnewmodulesareintegrated,somesubsetoftestsisre-run,A,B,C,D,E,F,G,TheseslidesaredesignedtoaccompanySoftwareEngineering:APract

13、itionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,15,自底向上集成,driversarereplacedoneata,time,depthfirst,workermodulesaregroupedinto,buildsandintegrated,A,B,C,D,E,F,G,cluster,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidesco

14、pyright2009byRogerPressman.,16,混合方式测试,Topmodulesaretestedwithstubs,Workermodulesaregroupedinto,buildsandintegrated,A,B,C,D,E,F,G,cluster,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,17,回归测试,回归测试是重新执行已进行测试的某个子集,以确

15、保变更没有传播不期望的副作用。软件发生变更时,软件配置的某些方面(程序、文档或支持数据)也发生变更。回归测试有助于保证变更(由于测试或其他原因)不引入无意识行为或额外的错误。回归测试可以手工进行,方法是重新执行所有测试用例的子集,或者利用捕捉、回放工具自动进行。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,18,SmokeTesting,Acommonapproachforc

16、reating“dailybuilds”forproductsoftwareSmoketestingsteps:Softwarecomponentsthathavebeentranslatedintocodeareintegratedintoa“build.”Abuildincludesalldatafiles,libraries,reusablemodules,andengineeredcomponentsthatarerequiredtoimplementoneormoreproductfunctions.Aseriesoftestsisdesignedtoexposeerrorsthat

17、willkeepthebuildfromproperlyperformingitsfunction.Theintentshouldbetouncover“showstopper”errorsthathavethehighestlikelihoodofthrowingthesoftwareprojectbehindschedule.Thebuildisintegratedwithotherbuildsandtheentireproduct(initscurrentform)issmoketesteddaily.Theintegrationapproachmaybetopdownorbottomu

18、p.,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,19,冒烟测试,一种常用的集成测试方法本质上冒烟测试方法包括下列活动:将已经转换为代码的软件构件集成到构建中。设计一系列测试以暴露影响构建正确完成其功能的错误。每天将该构建与其他构建及整个软件产品集成起来进行冒烟测试。,TheseslidesaredesignedtoaccompanySoftwareEngineering:A

19、PractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,20,面向对象软件的测试,测试策略基于线程的测试,集成响应系统的一个输入或事件所需的一组类。每个线程单独地集成和测试。应用回归测试以确保没有副效应产生。基于使用的测试,通过测试很少使用服务类(如果有的话)的那些类(称之为独立类)开始构造系统,面向对象软件的类测试等同于传统软件的单元测试。不同的是传统软件的单元测试侧重于模块的算法细节和穿过模块接口的数据,面向对象软件的类测试是由封装在该类中的操作和类的状态行为驱动的。,Theseslide

20、saredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,21,BroadeningtheViewof“Testing”,ItcanbearguedthatthereviewofOOanalysisanddesignmodelsisespeciallyusefulbecausethesamesemanticconstructs(e.g.,classes,attributes,operations,messag

21、es)appearattheanalysis,design,andcodelevel.Therefore,aprobleminthedefinitionofclassattributesthatisuncoveredduringanalysiswillcircumventsideeffectsthatmightoccuriftheproblemwerenotdiscovereduntildesignorcode(oreventhenextiterationofanalysis).,TheseslidesaredesignedtoaccompanySoftwareEngineering:APra

22、ctitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,22,TestingtheCRCModel,1.RevisittheCRCmodelandtheobject-relationshipmodel.2.InspectthedescriptionofeachCRCindexcardtodetermineifadelegatedresponsibilityispartofthecollaboratorsdefinition.3.Inverttheconnectiontoensurethateachc

23、ollaboratorthatisaskedforserviceisreceivingrequestsfromareasonablesource.4.Usingtheinvertedconnectionsexaminedinstep3,determinewhetherotherclassesmightberequiredorwhetherresponsibilitiesareproperlygroupedamongtheclasses.5.Determinewhetherwidelyrequestedresponsibilitiesmightbecombinedintoasinglerespo

24、nsibility.6.Steps1to5areappliediterativelytoeachclassandthrougheachevolutionoftheanalysismodel.,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,23,高阶测试,确认测试关注软件需求系统测试关注系统集成Alpha/Beta测试关注用户使用恢复测试通过各种方式强制地让系统发生故障,并验证其

25、能适当恢复安全测试验证建立在系统内的保护机制是否能够实际保护系统不受非法入侵压力测试要求以非正常的数量、频率或容量的方式执行系统性能测试测试软件在集成环境中的运行性能,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,24,调试:诊断的过程,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersAppr

26、oach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,25,诊断过程,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,26,调试工作,确定问题原因所花费的时间,纠正错误和回归测试需要的时间,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractit

27、ionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,27,问题&线索,问题,线索,症状与原因出现的地方可能相隔很远;,症状可能在另一个错误被改正时(暂时)消失,症状实际上可能是由非错误因素引起的;,症状可能是由不易追踪的人为错误引起的;,症状可能是由计时问题而不是处理问题引起的;,症状可能时有时无;,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,28,Bugs带来的后果,damage,mild,annoying,disturbing,serious,extreme,catastrophic,infectious,BugT

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论