




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
Topic:
SoftwareTestingTechniques(2)INSTRUCTOR:SHULIUHITSCHOOLOFSOFTWARE2017Allrightsreserved1SQAandTestingSoftwareTestingTechniquesBlack-BoxTestingBoundaryValueTestingSpecialValueTestingRandomTestingPositiveandNegativeTestingRangeTestingEquivalenceClassTestingDecisionTable-BasedTestingExamples:TheTriangleProblemTheNextDateFunctionTheCommissionProblemWhite-BoxGray-BoxTestingSoftwareTestingTechniques2SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)Theequivalencepartitioningtesting(equivalenceclasstesting)techniqueisablack-boxtestingtechnique.Fromtherequirements,eachinputisdividedintopartitions(equivalenceclasses),andonerepresentativevaluefromeachpartition(equivalenceclass)isselectedandtested.Equivalenceclass,asetoftestcases(class)suchthatanyonememberoftheclassisasgoodatestcaseasanyother.SoftwareTestingTechniques3SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)Theuseofequivalenceclassesasthebasisforfunctionaltestinghastwomotivations:
Tohavecompletetesting Toavoidredundancy(moreefficient)Theideaofequivalenceclasstestingistoidentifytestcasesbyusingoneelementfromeachequivalenceclass.SoftwareTestingTechniques4SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)ThekeyofequivalenceclasstestingisthechoiceoftheequivalencerelationthatdeterminestheequivalenceclassesItisassumedthattheresultspredicttheresultsforothervaluesinthepartition,whichdemonstratesthepowerandeconomyofthistechnique.SoftwareTestingTechniques5SQAandTestingEquivalenceClassTestingExample(Withonevariable):
AnIRSprogramcomputestheamountofstateincometaxbasedontheincome,asisdisplayedinthetable:SoftwareTestingTechniquesIncomeRangeTax%Due$1and$30,50025%$30,501and62,50027%$62,501andmore38%6SQAandTestingDefineEquivalenceClassesSoftwareTestingTechniquesEquivalenceClassIncomeRangeTax%DueEquivalenceClass1$1and$30,50025%EquivalenceClass2$30,501and62,50027%EquivalenceClass3$62,501andmore38%EquivalenceClassTestingTestCase#TestValue(input)ExpectedValue(output)EquivalencePartition1$25,0006,250$1and30,500240,50010,935$30,501and$62,500385,20032,37662,501andmoreCreateTestCases7SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)WeakNormalEquivalenceClassTesting(弱一般等價(jià)類測試)StrongNormalEquivalenceClassTesting
(強(qiáng)一般等價(jià)類測試)WeakRobustEquivalenceClassTesting(弱健壯等價(jià)類測試)StrongRobustEquivalenceClassTesting(強(qiáng)健壯等價(jià)類測試)SoftwareTestingTechniques8SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)WeakNormalEquivalenceClassTesting
(弱一般等價(jià)類測試)Weaknormalequivalenceclasstestingisaccomplishedbyusingonevariablefromeachequivalenceclass
(interval)inatestcase.Forexample:FunctionFwithtwovariablesx,andya=<x=<dwithintervals[a,b),[b,c),[c,d]e=<y=<gwithintervals[e,f),[f,g]SoftwareTestingTechniques9SQAandTestingyxabcdefg●●●EquivalenceClassTesting
(等價(jià)類測試)WeakNormalEquivalenceClassTesting FunctionFwithtwovariablesx,andy10SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)StrongNormalEquivalenceClassTesting(強(qiáng)一般等價(jià)類測試)Strongequivalenceclasstestingisbasedonthemultiplefaultassumption.SoweneedtestcasesfromeachelementoftheCartesianproduct(笛卡爾積)oftheequivalenceclasses.Forexample:FunctionFwithtwovariablesx,andya=<x=<dwithintervals[a,b),[b,c),[c,d]e=<y=<gwithintervals[e,f),[f,g]SoftwareTestingTechniquesTheCartesianproductguaranteesthatwehaveanotionof“completeness”intwosenses:WecoveralltheequivalenceclassesWehaveoneofeachpossiblecombinationofinputs.笛卡爾積可保證兩種意義上的“完備性”:覆蓋所有的等價(jià)類有可能的輸入組合中的一個(gè)11SQAandTestingyxabcdefg●●●EquivalenceClassTesting
(等價(jià)類測試)StrongNormalEquivalenceClassTestingFunctionFwithtwovariablesx,andy●●●12SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)WeakRobustEquivalenceClassTesting(弱健壯等價(jià)類測試)Thenameforthisformisadmittedlycounterintuitive(違反直覺的)andoxymoronic(矛盾的).Howcansomethingbebothweakandrobust?Therobustpartcomesfromconsiderationofinvalidvalues,andtheweakpartreferstothesinglefaultassumption.1.Forvalidinputs,useonevaluefromeachvalidclass(weaknormalequivalenceclass).2.Forinvalidinputs,atestcasewillhaveoneinvalidvalueandtheremainingvalueswillallbevalid.SoftwareTestingTechniques13SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)WeakRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●●14SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)WeakRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●15SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)StrongRobustEquivalenceClassTesting
(強(qiáng)健壯等價(jià)類測試)Atleastthenameforthisformisneithercounterintuitivenoroxymoronic,justredundant.TherobustpartcomesfromconsiderationofinvalidvaluesThestrongpartreferstothemultiplefaultassumption.SoftwareTestingTechniques16SQAandTestingEquivalenceClassTesting
(等價(jià)類測試)StrongRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●●●●●●●●●●●●●●●●●17SQAandTestingDecisionTable-BasedTesting
(基于決策表的測試)Ofallthefunctionaltestingmethods,thosebasedondecisiontablesarethemostrigorousbecauseitenforcelogicalrigor.Decisiontableshavebeenusedtorepresentandanalyzecomplexlogicalrelationshipssincethe1960s.Decisiontablesareidealfordescribingsituationsinwhichanumberofcombinationsofactionsaretakenundervaryingsetsofconditions.Decisiontable-basedtestingisafunctionaltestingtechnique.SoftwareTestingTechniques18SQAandTestingDecisionTable-BasedTesting
(基于決策表的測試)
DecisionTables(決策表)SoftwareTestingTechniquesc1TTTTc2TTFFc3F-T-a1XXXa2XXa3XXXStubPortionEntryPortionConditionPortionActionPortionConditionstubConditionentriesActionstubActionentries19SQAandTestingDecisionTable-BasedTesting
(基于決策表的測試)
RulesofDecisionTables(決策表)
Acolumnintheentryportionisarule.RulesindicatewhichactionsaretakenfortheconditionalcircumstancesindicatedintheconditionportionoftheruleSoftwareTestingTechniquesc1TFFTc2TTFFc3F-T-a1XXXa2XXa3XXX“Don’tcare”O(jiān)r“n/a”entry20SQAandTestingDecisionTable-BasedTesting
(基于決策表的測試)Toidentifytestcaseswithdecisiontables,weinterpretconditionsasinputsandactionsasoutputsHowtotestthetriangleprogramwithdecisiontable:1.CreatedecisiontablefortheTriangleProblem2.DesigntestcasesbaseondecisiontableSoftwareTestingTechniques21SQAandTestingTheTriangleProblemThetriangleprogramacceptsthreeintegers,a,b,andcasinput.Thesearetakentobesidesofatriangle.Theintegersa,b,andcmustsatisfythefollowingconditions:SoftwareTestingTechniquesC1:1=<a=<200C4:a<b+cC2:1=<b=<200C5:b<a+cC3:1=<c=<200C6:c<a+b
溫馨提示
- 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)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 勘察設(shè)計(jì)合同住建部
- 2025年咸寧貨運(yùn)從業(yè)資格證考試模擬考試題庫
- 2025年西雙版納貨運(yùn)運(yùn)輸駕駛員從業(yè)資格證考試試題
- 電商總監(jiān)勞務(wù)合同5篇
- 2023年高考真題全國乙卷地理試卷解析
- 微晶玻璃管戰(zhàn)略市場規(guī)劃報(bào)告
- 加班裝貨送貨合同范本
- 鹵肉店培訓(xùn)合同范本
- 廚房技術(shù)購買合同范本
- 1+X無人機(jī)模擬題與答案
- 航天集團(tuán)人才隊(duì)伍建設(shè)經(jīng)驗(yàn)介紹
- 牙周炎-侵襲性牙周炎
- 心理委員工作記錄表
- 新教科版五下科學(xué)1-5《當(dāng)環(huán)境改變了》公開課課件
- 教師的十大轉(zhuǎn)變課件
- 焦化廠生產(chǎn)工序及工藝流程圖
- 可下載打印的公司章程
- 中藥熏洗法課件
- 本特利探頭應(yīng)用
- QMR-110-00員工手部、接觸面等微生物檢驗(yàn)記錄記錄
- 外陰及陰道炎癥
評論
0/150
提交評論