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