•Black-boxtestingTheblack-boxapproachisatestingmethodinwhichtestdataarederivedfromthespecifiedfunctionalrequirementswithoutregardtoth
•Black-boxtestingTheblack-boxapproachisatestingmethodinwhichtestdataarederivedfromthespecifiedfunctionalrequirementswithoutregardtothefinalprogramstructure.Itisalsotermeddata-driven,input/outputdriven,orrequirements-basedtesting.Becauseonlythefunctionalityofthesoftwaremoduleisofconcern,black-boxtestingalsomainlyreferstofunctionaltesting--atestingmethodemphasizedonexecutingthefunctionsandexaminationoftheirinputandoutputdata.Thetestertreatsthesoftwareundertestasablackbox--onlytheinputs,outputsandspecificationarevisible,andthefunctionalityisdeterminedbyobservingtheoutputstocorrespondinginputs.Intesting,variousinputsareexercisedandtheoutputsarecomparedagainstspecificationtovalidatethecorrectness.Alltestcasesarederivedfromthespecification.Noimplementationdetailsofthecodeareconsidered.Itisobviousthatthemorewehavecoveredintheinputspace,themoreproblemswewillfindandthereforewewillbemoreconfidentaboutthequalityofthesoftware.Ideallywewouldbetemptedtoexhaustivelytesttheinputspace.Butasstatedabove,exhaustivelytestingthecombinationsofvalidinputswillbeimpossibleformostoftheprograms,letaloneconsideringinvalidinputs,timing,sequence,andresourcevariables.Combinatorialexplosionisthemajorroadblockinfunctionaltesting.Tomakethingsworse,wecanneverbesurewhetherthespecificationiseithercorrectorcomplete.Duetolimitationsofthelanguageusedinthespecifications(usuallynaturallanguage),ambiguityisofteninevitable.Evenifweusesometypeofformalorrestrictedlanguage,wemaystillfailtowritedownallthepossiblecasesinthespecification.Sometimes,thespecificationitselfbecomesanintractab ,orisnot,whattheywantaftertheyhavebeenfinished.Specificationproblemscontributesapproximately30percentofallbugsinsoftware.Theresearchinblack-boxtestingmainlyfocusesonhowtomaximizetheeffectivenessoftestingwithminimumcost,usuallythenumberoftestcases.Itisnotpossibletoexhausttheinputspace,butitispossibletoexhaustivelytestasubsetoftheinputspace.Partitioningisoneofthecommontechniques.Ifwehavepartitionedtheinputspaceandassumealltheinputvaluesinapartitionisequivalent,thenweonlyneedtotestonerepresentativevalueineachpartitiontosufficientlycoverthewholeinputspace.Domaintestingpartitionstheinputdomainintoregions,andconsidertheinputvaluesineachdomainanequivalentclass.Domainscanbeexhaustivelytestedandcoveredbyselectingarepresentativevalue(s)ineachdomain.Boundaryvaluesareofspecialinte
展开
全部