版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Topic:
SoftwareTestingTechniques(2)INSTRUCTOR:SHULIUHITSCHOOLOFSOFTWARE2017Allrightsreserved1SQAandTestingSoftwareTestingTechniquesBlack-BoxTestingBoundaryValueTestingSpecialValueTestingRandomTestingPositiveandNegativeTestingRangeTestingEquivalenceClassTestingDecisionTable-BasedTestingExamples:TheTriangleProblemTheNextDateFunctionTheCommissionProblemWhite-BoxGray-BoxTestingSoftwareTestingTechniques2SQAandTestingEquivalenceClassTesting
(等价类测试)Theequivalencepartitioningtesting(equivalenceclasstesting)techniqueisablack-boxtestingtechnique.Fromtherequirements,eachinputisdividedintopartitions(equivalenceclasses),andonerepresentativevaluefromeachpartition(equivalenceclass)isselectedandtested.Equivalenceclass,asetoftestcases(class)suchthatanyonememberoftheclassisasgoodatestcaseasanyother.SoftwareTestingTechniques3SQAandTestingEquivalenceClassTesting
(等价类测试)Theuseofequivalenceclassesasthebasisforfunctionaltestinghastwomotivations:
Tohavecompletetesting Toavoidredundancy(moreefficient)Theideaofequivalenceclasstestingistoidentifytestcasesbyusingoneelementfromeachequivalenceclass.SoftwareTestingTechniques4SQAandTestingEquivalenceClassTesting
(等价类测试)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
(等价类测试)WeakNormalEquivalenceClassTesting(弱一般等价类测试)StrongNormalEquivalenceClassTesting
(强一般等价类测试)WeakRobustEquivalenceClassTesting(弱健壮等价类测试)StrongRobustEquivalenceClassTesting(强健壮等价类测试)SoftwareTestingTechniques8SQAandTestingEquivalenceClassTesting
(等价类测试)WeakNormalEquivalenceClassTesting
(弱一般等价类测试)Weaknormalequivalenceclasstestingisaccomplishedbyusingonevariablefromeachequivalenceclass
(interval)inatestcase.Forexample:FunctionFwithtwovariablesx,andya=<x=<dwithintervals[a,b),[b,c),[c,d]e=<y=<gwithintervals[e,f),[f,g]SoftwareTestingTechniques9SQAandTestingyxabcdefg●●●EquivalenceClassTesting
(等价类测试)WeakNormalEquivalenceClassTesting FunctionFwithtwovariablesx,andy10SQAandTestingEquivalenceClassTesting
(等价类测试)StrongNormalEquivalenceClassTesting(强一般等价类测试)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.笛卡尔积可保证两种意义上的“完备性”:覆盖所有的等价类有可能的输入组合中的一个11SQAandTestingyxabcdefg●●●EquivalenceClassTesting
(等价类测试)StrongNormalEquivalenceClassTestingFunctionFwithtwovariablesx,andy●●●12SQAandTestingEquivalenceClassTesting
(等价类测试)WeakRobustEquivalenceClassTesting(弱健壮等价类测试)Thenameforthisformisadmittedlycounterintuitive(违反直觉的)andoxymoronic(矛盾的).Howcansomethingbebothweakandrobust?Therobustpartcomesfromconsiderationofinvalidvalues,andtheweakpartreferstothesinglefaultassumption.1.Forvalidinputs,useonevaluefromeachvalidclass(weaknormalequivalenceclass).2.Forinvalidinputs,atestcasewillhaveoneinvalidvalueandtheremainingvalueswillallbevalid.SoftwareTestingTechniques13SQAandTestingEquivalenceClassTesting
(等价类测试)WeakRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●●14SQAandTestingEquivalenceClassTesting
(等价类测试)WeakRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●15SQAandTestingEquivalenceClassTesting
(等价类测试)StrongRobustEquivalenceClassTesting
(强健壮等价类测试)Atleastthenameforthisformisneithercounterintuitivenoroxymoronic,justredundant.TherobustpartcomesfromconsiderationofinvalidvaluesThestrongpartreferstothemultiplefaultassumption.SoftwareTestingTechniques16SQAandTestingEquivalenceClassTesting
(等价类测试)StrongRobustEquivalenceClassTestingFunctionFwithtwovariablesx,andyyxabcdefg●●●●●●●●●●●●●●●●●●●●17SQAandTestingDecisionTable-BasedTesting
(基于决策表的测试)Ofallthefunctionaltestingmethods,thosebasedondecisiontablesarethemostrigorousbecauseitenforcelogicalrigor.Decisiontableshavebeenusedtorepresentandanalyzecomplexlogicalrelationshipssincethe1960s.Decisiontablesareidealfordescribingsituationsinwhichanumberofcombinationsofactionsaretakenundervaryingsetsofconditions.Decisiontable-basedtestingisafunctionaltestingtechnique.SoftwareTestingTechniques18SQAandTestingDecisionTable-BasedTesting
(基于决策表的测试)
DecisionTables(决策表)SoftwareTestingTechniquesc1TTTTc2TTFFc3F-T-a1XXXa2XXa3XXXStubPortionEntryPortionConditionPortionActionPortionConditionstubConditionentriesActionstubActionentries19SQAandTestingDecisionTable-BasedTesting
(基于决策表的测试)
RulesofDecisionTables(决策表)
Acolumnintheentryportionisarule.RulesindicatewhichactionsaretakenfortheconditionalcircumstancesindicatedintheconditionportionoftheruleSoftwareTestingTechniquesc1TFFTc2TTFFc3F-T-a1XXXa2XXa3XXX“Don’tcare”Or“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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 助教工作制度
- 全月工作制度
- 交管所工作制度
- 五定工作制度
- 下周工作制度
- 单位报工作制度
- 四一工作制度
- 三包工作制度
- 2026 年中职钢铁冶炼(冶炼操作)试题及答案
- 车间班组安全活动
- 2026年国家公务员考试《申论》真题(副省级)试卷及答案
- 2026年湖北国土资源职业学院单招职业技能考试题库及答案详细解析
- 3小时吃透DeepSeek智能办公
- 广东粤财投资控股有限公司招聘笔试题库2026
- 2026届江苏省苏锡常镇四市高三一模教学情况调研(一)物理试题(含答案)
- 第10章 成立新企业
- 2026年南京机电职业技术学院单招综合素质考试题库附参考答案详解(综合卷)
- 2026年畜牧业疫病防控培训
- 2026及未来5年中国原子力显微镜(AFM)行业市场竞争态势及发展趋向研判报告
- 企业员工信息安全培训
- 2026年麻醉药品、精神药品规范化使用与管理培训考试题测试题库及答案
评论
0/150
提交评论