资源描述:
《软件测试相关度量》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SoftwareMetricsLecture10SoftwareTestMetrics清华大学软件学院2004年5月11日1COCOMOwherea,b,candddependonthedevelopmentmode.OrganicmodeSemi-detachedmodeEmbeddedmodeBasicmodelIntermediatemodelAdvancedmodel2COCOMO:BasicTheBasicCOCOMOModeabOrganic2.41.05Semi-detached3.01.12Embedded3.61.
2、20developmenttimecannotbepredictedatthisstage.3COCOMO:IntermediateTheIntermediateCOCOMO:ModecdOrganic2.50.38Semi-detached2.50.35Embedded2.50.32ModeabOrganic3.21.05Semi-detached3.01.12Embedded2.81.204COCOMOIIApplicationCompositionE=OP/PRODEarlyDesignmodelE=2.45×KLOC×EAF
3、Post-Architecturemodel5Putnam’sSLIM6TestConceptsEstimatingNumberofTestCase&AllocatingTestTimesTestCoverageMetricsRemainingDefectsMetricsContents7Section1TestConcepts8防不胜防的软件错误——例1:1963年,美国,飞往火星的火箭爆炸,损失$10million.原因:FORTRAN循环DO5I=1,3误写为DO5I=1.3软件测试是保证软件质量的关键步骤,是对软件规格说明、
4、设计和编码的最后复审,其工件量约占总工作量40%以上(对于人命关天的情况,测试相当于其它部分总成本的3—5倍)RolesofSoftwareTesting9Whatissoftwaretesting“Testingistheprocessofexecutingaprogramwiththeintentoffindingerrors.”GlenMyers10SoftwareTestingObjectivesNeedingminimumeffortandtimeShowingthatsoftwarefunctionsworkaccord
5、ingtospecificationItcannotshowabsenceoferrorsordefects.ItcanonlyshowthaterrorsarepresentUncoveringdifferentcasesoferrors111:5-10Mainframesi.e.,1testerforevery5to10developers2:3Microsoft,19922:1Lotus(for1-2-3Windows)1:2Averageof4majorcompanies,1992Microsoft,Borland,Word
6、Perfect,NovellTester-to-developerratios12Whatisatestcase?Asetoftestinputs,executionconditions,andexpectedresultsdevelopedforaparticularobjective13Atestismadeupof(many)testcasesAtestprocedureisthedetailedinstructionsforsettingup,starting,monitoringandrestartingagiventes
7、tcase.a.k.atestplanatestcasemaybeusedinmorethanonetestprocedureatestcasemayincludemanysubtestsWhatisatest?14TesttestcasetestcasetestcasesubtestsubtestsubtestsubtestWhatisatest?(cont.)15TestingMethodologyWhite-boxSELECTEDINPUTSRESULTANTOUTPUTSINTERNALBEHAVIORDESIREDOUTP
8、UTSOFTWAREDESIGNBlack-boxSELECTEDINPUTSRESULTANTOUTPUTSDESIREDOUTPUT16Objective:CoverthesoftwarestructureStructural(W