《軟件工程-實(shí)踐者的研究方法》chapter-14-cn-軟件測(cè)試策略_第1頁(yè)
《軟件工程-實(shí)踐者的研究方法》chapter-14-cn-軟件測(cè)試策略_第2頁(yè)
《軟件工程-實(shí)踐者的研究方法》chapter-14-cn-軟件測(cè)試策略_第3頁(yè)
《軟件工程-實(shí)踐者的研究方法》chapter-14-cn-軟件測(cè)試策略_第4頁(yè)
《軟件工程-實(shí)踐者的研究方法》chapter-14-cn-軟件測(cè)試策略_第5頁(yè)
已閱讀5頁(yè),還剩26頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill,2009).Slidescopyright2009byRogerPressman.,1,第十四章,軟件測(cè)試策略,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,軟件測(cè)試,測(cè)試是在程序發(fā)布給最終用戶(hù)之前,執(zhí)行程序以發(fā)現(xiàn)錯(cuò)誤的過(guò)程。.,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressma

4、n.,3,測(cè)試展示了,錯(cuò)誤,需求一致性,性能,質(zhì)量,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,4,測(cè)試的策略性方法,為完成有效的測(cè)試,軟件團(tuán)隊(duì)?wèi)?yīng)該進(jìn)行有效的、正式的技術(shù)評(píng)審。通過(guò)評(píng)審,許多錯(cuò)誤可以在測(cè)試開(kāi)始之前排除。測(cè)試開(kāi)始于構(gòu)件層,然后向外“延伸”到整個(gè)基于計(jì)算機(jī)系統(tǒng)的集成。不同的測(cè)試技術(shù)適用于不同的時(shí)間點(diǎn)。測(cè)試由軟件開(kāi)發(fā)人員和(對(duì)大型項(xiàng)目而言)獨(dú)立的測(cè)試組執(zhí)行。測(cè)試和調(diào)

5、試是不同的活動(dòng),但任何測(cè)試策略中都必須包括調(diào)試。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,5,驗(yàn)證與確認(rèn)(V&V),驗(yàn)證是指確保軟件正確地實(shí)現(xiàn)某一特定功能的一系列活動(dòng)。確認(rèn)則指的是確保開(kāi)發(fā)的軟件可追溯到用戶(hù)需求的另外一系列活動(dòng)。BOE81用另一種方式說(shuō)明了這兩者的區(qū)別:驗(yàn)證:我們?cè)谡_地構(gòu)造產(chǎn)品嗎?確認(rèn):我們?cè)跇?gòu)造正確的產(chǎn)品嗎?,Theseslidesaredesigne

6、dtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,6,由誰(shuí)來(lái)測(cè)試軟件?,開(kāi)發(fā)者,獨(dú)立的測(cè)試人員,Understandsthesystem,but,willtestgently,and,isdrivenbydelivery,Mustlearnaboutthesystem,but,willattempttobreakit,and,isdrivenbyquality,Theseslidesaredesignedtoaccompa

7、nySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,7,測(cè)試策略,系統(tǒng)工程,分析模型,設(shè)計(jì)模型,編碼,單元測(cè)試,集成測(cè)試,確認(rèn)測(cè)試,系統(tǒng)測(cè)試,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,8,測(cè)試策略,測(cè)試從“小規(guī)模”開(kāi)始,進(jìn)展

8、到“大規(guī)模”。傳統(tǒng)軟件測(cè)試關(guān)注測(cè)試單個(gè)構(gòu)件或相關(guān)的一小組構(gòu)件構(gòu)件集成測(cè)試面向?qū)ο筌浖臏y(cè)試測(cè)試目標(biāo)就是在現(xiàn)實(shí)的時(shí)間范圍內(nèi)利用可控的工作量盡可能多地找到錯(cuò)誤。對(duì)于面向?qū)ο筌浖M管這個(gè)基本目標(biāo)是不變的,但面向?qū)ο筌浖谋举|(zhì)特征改變了測(cè)試策略和測(cè)試戰(zhàn)術(shù)。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,9,StrategicIssues,早在開(kāi)始測(cè)試之前,就要以量化的方式規(guī)定產(chǎn)品需求

9、。明確地陳述測(cè)試目標(biāo)了解軟件的用戶(hù)并為每類(lèi)用戶(hù)建立用戶(hù)輪廓。建立強(qiáng)調(diào)”快速周期測(cè)試“的測(cè)試計(jì)劃。建立能夠測(cè)試自身的“健壯”軟件測(cè)試之前,利用有效的正式技術(shù)評(píng)審作為過(guò)濾器。實(shí)施正式技術(shù)評(píng)審以評(píng)估測(cè)試策略和測(cè)試用例本身。為測(cè)試過(guò)程建立一種持續(xù)的改進(jìn)方法。,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,10,單元測(cè)試,測(cè)試模塊,測(cè)試用例,結(jié)果,軟件工程師,Theseslidesare

10、designedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,11,單元測(cè)試,接口,局部數(shù)據(jù)結(jié)構(gòu),邊界條件,獨(dú)立路徑,錯(cuò)誤處理路徑,測(cè)試模塊,測(cè)試用例,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,12,

11、單元測(cè)試環(huán)境,被測(cè)模塊,樁模塊,樁模塊,驅(qū)動(dòng)程序,結(jié)果,接口,局部數(shù)據(jù)結(jié)構(gòu),邊界條件,獨(dú)立路徑,錯(cuò)誤處理路徑,測(cè)試用例,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,13,集成測(cè)試策略,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,混合方式測(cè)試,Topmodulesaretestedwithstubs,Workermodulesaregroupedinto,buildsandintegrated,A,B,C,D,E,F,G,cluster,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,17,回歸測(cè)試,回歸測(cè)試是重新執(zhí)行已進(jìn)行測(cè)試的某個(gè)子集,以確

15、保變更沒(méi)有傳播不期望的副作用。軟件發(fā)生變更時(shí),軟件配置的某些方面(程序、文檔或支持?jǐn)?shù)據(jù))也發(fā)生變更?;貧w測(cè)試有助于保證變更(由于測(cè)試或其他原因)不引入無(wú)意識(shí)行為或額外的錯(cuò)誤?;貧w測(cè)試可以手工進(jìn)行,方法是重新執(zhí)行所有測(cè)試用例的子集,或者利用捕捉、回放工具自動(dòng)進(jìn)行。,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,冒煙測(cè)試,一種常用的集成測(cè)試方法本質(zhì)上冒煙測(cè)試方法包括下列活動(dòng):將已經(jīng)轉(zhuǎn)換為代碼的軟件構(gòu)件集成到構(gòu)建中。設(shè)計(jì)一系列測(cè)試以暴露影響構(gòu)建正確完成其功能的錯(cuò)誤。每天將該構(gòu)建與其他構(gòu)建及整個(gè)軟件產(chǎn)品集成起來(lái)進(jìn)行冒煙測(cè)試。,TheseslidesaredesignedtoaccompanySoftwareEngineering:A

19、PractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,20,面向?qū)ο筌浖臏y(cè)試,測(cè)試策略基于線程的測(cè)試,集成響應(yīng)系統(tǒng)的一個(gè)輸入或事件所需的一組類(lèi)。每個(gè)線程單獨(dú)地集成和測(cè)試。應(yīng)用回歸測(cè)試以確保沒(méi)有副效應(yīng)產(chǎn)生?;谑褂玫臏y(cè)試,通過(guò)測(cè)試很少使用服務(wù)類(lèi)(如果有的話)的那些類(lèi)(稱(chēng)之為獨(dú)立類(lèi))開(kāi)始構(gòu)造系統(tǒng),面向?qū)ο筌浖念?lèi)測(cè)試等同于傳統(tǒng)軟件的單元測(cè)試。不同的是傳統(tǒng)軟件的單元測(cè)試側(cè)重于模塊的算法細(xì)節(jié)和穿過(guò)模塊接口的數(shù)據(jù),面向?qū)ο筌浖念?lèi)測(cè)試是由封裝在該類(lèi)中的操作和類(lèi)的狀態(tài)行為驅(qū)動(dòng)的。,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,高階測(cè)試,確認(rèn)測(cè)試關(guān)注軟件需求系統(tǒng)測(cè)試關(guān)注系統(tǒng)集成Alpha/Beta測(cè)試關(guān)注用戶(hù)使用恢復(fù)測(cè)試通過(guò)各種方式強(qiáng)制地讓系統(tǒng)發(fā)生故障,并驗(yàn)證其

25、能適當(dāng)恢復(fù)安全測(cè)試驗(yàn)證建立在系統(tǒng)內(nèi)的保護(hù)機(jī)制是否能夠?qū)嶋H保護(hù)系統(tǒng)不受非法入侵壓力測(cè)試要求以非正常的數(shù)量、頻率或容量的方式執(zhí)行系統(tǒng)性能測(cè)試測(cè)試軟件在集成環(huán)境中的運(yùn)行性能,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,24,調(diào)試:診斷的過(guò)程,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersAppr

26、oach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,25,診斷過(guò)程,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,26,調(diào)試工作,確定問(wèn)題原因所花費(fèi)的時(shí)間,糾正錯(cuò)誤和回歸測(cè)試需要的時(shí)間,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractit

27、ionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,27,問(wèn)題&線索,問(wèn)題,線索,癥狀與原因出現(xiàn)的地方可能相隔很遠(yuǎn);,癥狀可能在另一個(gè)錯(cuò)誤被改正時(shí)(暫時(shí))消失,癥狀實(shí)際上可能是由非錯(cuò)誤因素引起的;,癥狀可能是由不易追蹤的人為錯(cuò)誤引起的;,癥狀可能是由計(jì)時(shí)問(wèn)題而不是處理問(wèn)題引起的;,癥狀可能時(shí)有時(shí)無(wú);,TheseslidesaredesignedtoaccompanySoftwareEngineering:APractitionersApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRogerPressman.,28,Bugs帶來(lái)的后果,damage,mild,annoying,disturbing,serious,extreme,catastrophic,infectious,BugT

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論