Testing of object-oriented programming systems (OO

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

TestingofObject-OrientedProgrammingSystems(OOPS):AFault-BasedApproachJaneHuffmanHayesScienceApplicationsInternationalCorporation1213Jefferson-DavisHighway,Suite1300Arlington,Virginia22202Abstract.Thegoalofthispaperistoexaminethetestingofobject-orientedsystemsandtocompareandcontrastitwiththetestingofconventionalprogramminglanguagesystems,withemphasisonfault-basedtesting.Conventionalsystemtesting,object-orientedsystemtesting,andtheapplicationofconventionaltestingmethodstoobject-orientedsoftwarewillbeexamined,followedbyalookatthedifferencesbetweentestingofconventional(procedural)softwareandthetestingofobject-orientedsoftware.Anexaminationofsoftwarefaults(defects)willfollow,withemphasisondevelopingapreliminarytaxonomyoffaultsspecifictoobject-orientedsystems.Teststrategyadequacywillbebrieflypresented.Asaresultoftheseexaminations,asetofcandidatetestingmethodsforobject-orientedprogrammingsystemswillbeidentified.1IntroductionandOverviewTwomajorforcesaredrivingmoreandmorepeopletowardObject-OrientedProgrammingSystems(OOPS):theneedtoincreaseprogrammerproductivity,andtheneedforhigherreliabilityofthedevelopedsystems.Itcanbeexpectedthatsometimeinthenearfuturetherewillbereusabletrustedobjectlibrariesthatwillrequirethehighestlevelofintegrity.AllthispointstotheneedforameansofassuringthequalityofOOPS.Specifically,ameansforperformingverificationandvalidation(V&V)onOOPSisneeded.Thegoalofthispaperistoexaminethetestingofobject-orientedsystemsandtocompareandcontrastitwiththetestingofconventionalprogramminglanguagesystems,withemphasisonfault-basedtesting.1.1IntroductiontoObject-OrientedProgrammingSystems(OOPS)Object-OrientedProgrammingSystems(OOPS)arecharacterizedbyseveraltraits,withthemostimportantonebeingthatinformationislocalizedaroundobjects(asopposedtofunctionsordata)[3].Meyerdefinesobject-orienteddesignastheconstructionofsoftwaresystemsasstructuredcollectionsofabstractdatatypeimplementations[15].TounderstandOOPS,severalhighlevelconceptsmustbeintroduced:objects,classes,inheritance,polymorphism,anddynamicbinding.Objectsrepresentreal-worldentitiesandencapsulateboththedataandthefunctions(i.e.,behaviorandstate)whichdealwiththeentity.Objectsarerun-timeinstancesofclasses.Classesdefineasetofpossibleobjects.Aclassismeanttoimplementauser-definedtype(ideallyanAbstractDataType(ADT)tosupportdataabstraction).Thegoalistokeeptheimplementationdetailsprivatetotheclass(informationhiding).Inheritancereferstotheconceptofanewclassbeingdeclaredasanextensionorrestrictionofapreviouslydefinedclass[15].Polymorphismreferstotheabilitytotakemorethanoneform.Inobject-orientedsystems,itreferstoareferencethatcan,overtime,refertoinstancesofmorethanoneclass.Thestatictypeofthereferenceisdeterminedfromthedeclarationoftheentityintheprogramtext.Thedynamictypeofapolymorphicreferencemaychangefrominstanttoinstantduringtheprogramexecution.Dynamicbindingreferstothefactthatthecodeassociatedwithagivenprocedurecallisnotknownuntilthemomentofthecallatrun-time[12].Applyingtheprinciplesofpolymorphismandinheritance,itcanbeenvisionedthatafunctioncallcouldbeassociatedwithapolymorphicreference.Thusthefunctioncallwouldneedtoknowthedynamictypeofthereference.Thisprovidesatremendousadvantagetoprogrammersoverconventionalprogramminglanguages(oftenreferredtoasprocedurallanguages):theabilitytorequestanoperationwithoutexplicitlyselectingoneofitsvariants(thischoiceoccursatrun-time)[16].1.2IntroductiontoVerificationandValidation(V&V)Verificationandvalidationreferstotwodifferentprocessesthatareusedtoensurethatcomputersoftwarereliablyperformsthefunctionsthatitwasdesignedtofulfill.Thoughdifferentdefinitionsofthetermsverificationandvalidationexist,thefollowingdefinitionsfromANSI/IEEEStandard729-1983[10]arethemostwidelyacceptedandwillbeusedinthispaper:Verificationistheprocessofdeterminingwhetherornottheproductsofagivenphaseofthesoftwaredevelopmentcyclefulfilltherequirementsestablishedduringthepreviousphase.Validationistheprocessofevaluatingsoftwareattheendofthesoftwaredevelopmentprocesstoensurecompliancewithsoftwarerequirements.1.3IntroductiontoTestingTestingisasubsetofV&V.TheIEEEdefinitionoftestingistheprocessofexercisingorevaluatingasystemorsystemcomponentbymanualorautomatedmeanstoverifythatitsatisfiesspecifiedrequirementsortoidentifydifferencesbetweenexpectedandactualresults.[10].Conventionalsoftwaretestingisdividedintotwocategories:statictestinganddynamictesting.Statictestinganalyzesaprogramwithoutexecutingitwhiledynamictestingreliesonexecutionoftheprogramtoanalyzeit[5].Thefocusofthispaperwillbedynamictesting.Dynamictestingisoftenbrokenintotwocategories:black-boxtestingandwhite-boxtesting.Black-boxtestingreferstofunctionaltestingwhichdoesnottakeadvantageofimplementationdetailsandwhichexaminestheprogram'sfunctionalproperties.White-boxtesting,ontheotherhand,usesinformationabouttheprogram'sinternalcontrolflowstructureordatadependencies.1.4ResearchApproachFigure1.4-1depictstheresearchapproachtobetakeninthispaper.Theexaminationofconventionalsystemtesting,object-orientedsystemtesting,andtheapplica

1 / 22
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功