




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
第5章集成測試5.1深入研究SATM系統(tǒng)5.2集成測試的主要方法5.2.1基于功能分解的集成5.2.2基于調(diào)用圖的集成5.2.3基于路徑的集成5.3案例研究1西北工業(yè)大學(xué)軟件與微電子學(xué)院SATM系統(tǒng)的功能分解1A10BDE111213141523456789C1617F22181920212324252627Table1:SATMUnitsandAbbreviatedNamesUnitLevelUnitName11SATMSystemA1.1DeviceSense&ControlD1.1.1DoorSense&Control21.1.1.1GetDoorStatus31.1.1.2ControlDoor41.1.1.3DispenseCashE1.1.2SlotSense&Control51.1.2.1WatchCardSlot
61.1.2.2GetDepositSlotStatus71.1.2.3ControlCardRoller81.1.2.3ControlEnvelopeRoller91.1.2.5ReadCardStrip101.2CentralBankComm.111.2.1GetPINforPAN121.2.2GetAccountStatus131.2.3PostDailyTransactions
UnitLevelUnitNamB1.3TerminalSense&Control141.3.1ScreenDriver151.3.2KeySensorC1.4ManageSession161.4.1ValidateCard171.4.2ValidatePIN181.4.2.1
GetPIN
F1.4.3CloseSession191.4.3.1NewTransactionRequest201.4.3.2PrintReceipt211.4.3.3PostTransactionLocal221.4.4ManageTransaction231.4.4.1GetTransactionType241.4.4.2
GetAccountType251.4.4.3
ReportBalance261.4.4.4
ProcessDeposit271.4.4.5
ProcessWithdrawal2西北工業(yè)大學(xué)軟件與微電子學(xué)院5.2.1基于功能性分解的集成兩種表示方式樹和文字形式集成的4種模塊順序從樹頂開始向下:自頂向下(Top-down)從樹底開始向上:自底向上(Bottom-up)三明治方法:Sandwich大爆炸方法:BigBang3西北工業(yè)大學(xué)軟件與微電子學(xué)院大爆炸集成測試UnitTestHUnitTestDUnitTestCUnitTestBUnitTestASystem-WideTest………….Allcomponentsareassembledandtestedatonce.4西北工業(yè)大學(xué)軟件與微電子學(xué)院自頂向下集成TopSubtree
(Sessions1-4)SecondLevelSubtree
(Sessions12-15)BotomLevelSubtree
(Sessions38-42)5西北工業(yè)大學(xué)軟件與微電子學(xué)院自頂向下集成(續(xù))6西北工業(yè)大學(xué)軟件與微電子學(xué)院AdvantagesandDisadvantagesofTop-DownIntegrationTestingTestcasescanbedefinedintermsofthefunctionalityofthesystem(functionalrequirements).StructuraltechniquescanalsobeusedfortheunitsinthetoplevelsWritingstubscanbedifficultespeciallywhenparameterpassingiscomplex.StubsmustallowallpossibleconditionstobetestedPossiblyaverylargenumberofstubsmayberequired,especiallyifthelowestlevelofthesystemcontainsmanyfunctionalunitsOnesolutiontoavoidtoomanystubs:Modifiedtop-downtestingstrategy(Bruege)TesteachlayerofthesystemdecompositionindividuallybeforemergingthelayersDisadvantageofmodifiedtop-downtesting:Both,stubsanddriversareneeded7西北工業(yè)大學(xué)軟件與微電子學(xué)院自底向上集成TopSubtree(Sessions29-32)SecondLevelSubtree(Sessions25-28)BottomLevelSubtree(Sessions13-17)8西北工業(yè)大學(xué)軟件與微電子學(xué)院自底向上集成(續(xù))9西北工業(yè)大學(xué)軟件與微電子學(xué)院AdvantagesandDisadvantagesofBottom-UpIntegrationTestingNotoptimalstrategyforfunctionallydecomposedsystems:Teststhemostimportantsubsystem(UI)lastUsefulforintegratingthefollowingsystemsObject-orientedsystemsReal-timesystemsSystemswithstrictperformancerequirements10西北工業(yè)大學(xué)軟件與微電子學(xué)院三明治集成11西北工業(yè)大學(xué)軟件與微電子學(xué)院12西北工業(yè)大學(xué)軟件與微電子學(xué)院AdvantagesandDisadvantagesofSandwichIntegrationTestingTopandBottomLayerTestscanbedoneinparallelDoesnottesttheindividualsubsystemsthoroughlybeforeintegrationSolution:Modifiedsandwichtestingstrategy(Bruege)13西北工業(yè)大學(xué)軟件與微電子學(xué)院StepsinIntegration-Testing
.1.Basedontheintegrationstrategy,selectacomponenttobetested.Unittestalltheclassesinthecomponent.2.Putselectedcomponenttogether;doanypreliminaryfix-upnecessarytomaketheintegrationtestoperational(drivers,stubs)3.Dofunctionaltesting:Definetestcasesthatexerciseallusescaseswiththeselectedcomponent4.Dostructuraltesting:Definetestcasesthatexercisetheselectedcomponent5.Executeperformancetests6.Keeprecordsofthetestcasesandtestingactivities.7.Repeatsteps1to7untilthefullsystemistested.Theprimarygoalofintegrationtestingistoidentifyerrorsinthe(current)componentconfiguration.14西北工業(yè)大學(xué)軟件與微電子學(xué)院WhichIntegrationStrategyshouldyouuse?FactorstoconsiderAmountoftestharness(stubs&drivers)LocationofcriticalpartsinthesystemAvailabilityofhardwareAvailabilityofcomponentsSchedulingconcernsBottomupapproachgoodforobjectorienteddesignmethodologiesTestdriverinterfacesmustmatchcomponentinterfaces......Top-levelcomponentsareusuallyimportantandcannotbeneglecteduptotheendoftestingDetectionofdesignerrorspostponeduntilendoftestingTopdownapproachTestcasescanbedefinedintermsoffunctionsexaminedNeedtomaintaincorrectnessofteststubsWritingstubscanbedifficultRef:“Object-OrientedSoftwareEngineering–UsingUML,PatternsandJava”,BerndBruegge,AllenH.Dutoit15西北工業(yè)大學(xué)軟件與微電子學(xué)院優(yōu)缺點(diǎn)優(yōu)點(diǎn)直覺上清晰容易根據(jù)分解樹跟蹤缺點(diǎn)人工開發(fā)、樁或驅(qū)動器的開發(fā)工作量是這些方法的缺點(diǎn)、還有重新測試所需的工作量問題給定分解樹所需集成測試會話數(shù)的計算公式(一個測試過程是為一個特定配置的實(shí)際代碼和樁所做的一組測試)會話=節(jié)點(diǎn)-頁+邊SATM系統(tǒng)有42個集成測試過程-》42個單獨(dú)的集成測試用例集合對于自頂向下集成,需開發(fā)(節(jié)點(diǎn)-1個)樁;對于自底向上集成,需開發(fā)(節(jié)點(diǎn)-葉個)驅(qū)動器。對于SATM系統(tǒng),為32個樁和10個驅(qū)動器16西北工業(yè)大學(xué)軟件與微電子學(xué)院基于調(diào)用圖的集成成對集成思想是免除樁/驅(qū)動器開發(fā)工作相鄰集成可大大降低集成測試會話數(shù)量,且避免了樁和驅(qū)動器的開發(fā)計算公式內(nèi)部節(jié)點(diǎn)=節(jié)點(diǎn)-(源節(jié)點(diǎn)+匯節(jié)點(diǎn))鄰居=內(nèi)部節(jié)點(diǎn)+源節(jié)點(diǎn)鄰居=節(jié)點(diǎn)–匯節(jié)點(diǎn)17西北工業(yè)大學(xué)軟件與微電子學(xué)院18西北工業(yè)大學(xué)軟件與微電子學(xué)院19西北工業(yè)大學(xué)軟件與微電子學(xué)院20西北工業(yè)大學(xué)軟件與微電子學(xué)院基于路徑的集成21西北工業(yè)大學(xué)軟件與微電子學(xué)院22西北工業(yè)大學(xué)軟件與微電子學(xué)院23西北工業(yè)大學(xué)軟件與微電子學(xué)院Inaddition,thefollowingaremoduleexecutionpaths:MEP(A,1)=<1,2,3,6> MEP(B,1)=<1,2>MEP(A,2)=<1,2,4> MEP(B,2)=<3,4>MEP(A,3)=<5,6> MEP(C,1)=<1,2,4,5>MEP(C,2)=<1,3,4,5>
ExecutionPathsExample
24西北工業(yè)大學(xué)軟件與微電子學(xué)院Givenasetofunits,theirMM-Pathgraphisthedirectedgraphinwhichnodesaremoduleexecutionpathsand,edgescorrespondtomessagesandreturnsfromoneunittoanotherThedefinitioniswithrespecttoasetofunits.Itdirectlysupportscompositionofunitsandcompositionbasedintegrationtesting.Itispossibletocomposedowntolevelofindividualmoduleexecutionpathsbutitwouldbemoredetailedthannecessary.
MM-PathGraph
25西北工業(yè)大學(xué)軟件與微電子學(xué)院MEP(A,2)MEP(B,1)MEP(C,1)MEP(B,2)MEP(A,3)MEP(A,1)MEP(C,2)Figure2
TheFigure2aboveillustratestheMM-PathgraphfortheexampleinFigure1.Thesolidarrowsindicatemessagesandthecorrespondingreturnsareindicatedbydottedarrows.
MM-PathGraphExample
Ref:“SoftwareTestingACraftsman'sApproach”2ndedition,PaulC.Jorgensen26西北工業(yè)大學(xué)軟件與微電子學(xué)院MM-Pathsimplementafunctionthattranscendsunitboundaries,thuswehavethefollowingrelationship:Considerthe“intersection”ofanMM-Pathwithaunit.Themoduleexecutionpathsinthisintersectionareananalogofaslicewithrespecttothe(MM-Path)function.Hencethemoduleexecutionpathsinsuchanintersectionaretherestrictionofthefunctiontotheunitinwhichtheyoccur.
MM-PathAnalogy
27西北工業(yè)大學(xué)軟件與微電子學(xué)院TherearethreeobservablebehavioralcriteriathatputendpointsonMM-Paths:eventquiescence:occurswhenasystemisnearlyidle,waitingforaportinputeventtotriggerfurtherprocessing.Thisisasystemlevelpropertywithananalogattheintegrationlevel:messagequiescence.messagequiescence:occurswhenaunit
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 花城版七年級音樂作業(yè)布置計劃
- 小學(xué)書法課堂教學(xué)計劃
- 鼻咽側(cè)壁惡性腫瘤護(hù)理
- 2025初一上學(xué)期青年志愿者招募計劃
- 部編版六年級上冊語文綜合素養(yǎng)提升計劃
- 小學(xué)部編版一年級下冊道德與法治方案計劃
- 小學(xué)語文教學(xué)期末復(fù)習(xí)計劃
- 李白詩歌的藝術(shù)特色:二年級語文古詩教案
- 《音樂鑒賞:古典音樂風(fēng)格特點(diǎn)教學(xué)教案》
- 學(xué)前教育實(shí)習(xí)崗位工作計劃
- 廣告制作交貨進(jìn)度計劃及保障措施
- 三年級數(shù)學(xué)五千以內(nèi)加減混合兩步運(yùn)算題競賽測試口算題
- 2025至2030中國生物反饋儀行業(yè)產(chǎn)業(yè)運(yùn)行態(tài)勢及投資規(guī)劃深度研究報告
- 【公開課】牛頓第二定律+課件+-2024-2025學(xué)年高一上學(xué)期物理人教版(2019)必修第一冊+
- 預(yù)防錯混料培訓(xùn)
- 2024年江蘇省響水縣衛(wèi)生局公開招聘試題帶答案
- 2025年云南省中考地理試卷真題(含答案)
- 粵港澳大灣區(qū)青少年國情教育實(shí)踐基地(虎門渡口西岸物業(yè)提升改造項(xiàng)目)可行性研究報告
- 2025至2030中國實(shí)時視頻存儲行業(yè)產(chǎn)業(yè)運(yùn)行態(tài)勢及投資規(guī)劃深度研究報告
- 人教版三年級數(shù)學(xué)下學(xué)期期末復(fù)習(xí)試卷含答案10套
- 2024年7月三級老年人能力評估師練習(xí)題庫(含參考答案解析)
評論
0/150
提交評論