您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > 软件过程与管理chapter_17软件测试策略XXXX0329
1Chapter17软件测试策略计控学院吴迪著明软件错误案例研究著明软件错误案例研究讨论软件测试的重要性?7SoftwareTestingTestingistheprocessofexercisingaprogramwiththespecificintentoffindingerrorspriortodeliverytotheenduser.1、测试就是实行具有特定意图计划的一个过程;2、测试的意图就是在把软件产品交付给最终用户前找出错误。测试是有计划有步骤的活动,因此,为测试软件建立系统化的测试策略是合情合理的。817.1StrategicApproachToperformeffectivetesting,youshouldconducteffectivetechnicalreviews.Bydoingthis,manyerrorswillbeeliminatedbeforetestingcommences.Testingbeginsatthecomponentlevelandworksoutwardtowardtheintegrationoftheentirecomputer-basedsystem.Differenttestingtechniquesareappropriatefordifferentsoftwareengineeringapproachesandatdifferentpointsintime.Testingisconductedbythedeveloperofthesoftwareand(forlargeprojects)anindependenttestgroup.Testinganddebuggingaredifferentactivities,butdebuggingmustbeaccommodatedinanytestingstrategy.1017.1.1V&VVerificationreferstothesetoftasksthatensurethatsoftwarecorrectlyimplementsaspecificfunction.Validationreferstoadifferentsetoftasksthatensurethatthesoftwarethathasbeenbuiltistraceabletocustomerrequirements.Boehmstatesthisanotherway:Verification:Arewebuildingtheproductright?Validation:Arewebuildingtherightproduct?测试是软件质量安全网吗?1217.1.2WhoTeststheSoftware?developerindependenttesterUnderstandsthesystembut,willtestgentlyand,isdrivenbydeliveryMustlearnaboutthesystem,but,willattempttobreakitand,isdrivenbyquality开发者精心地设计和执行测试,试图证明其程序的正确性,而不是注意发现错误。在整个软件项目中,开发人员和(独立)测试组(ITG)密切配合以确保测试严格地进行。在测试进行的过程中,必须随时可以找到开发人员,以便及时修改发现的错误。讨论和作业用自己的话描述验证和确认的区别;理出一些与独立测试组的创建相关的问题。ITG和SQA小组是由相同的人员组成的吗?1417.1.3TestingStrategySystemengineeringAnalysismodelingDesignmodelingCodegenerationUnittestIntegrationtestValidationtestSystemtest1517.2StrategicIssuesSpecifyproductrequirementsinaquantifiablemannerlongbeforetestingcommences.Statetestingobjectivesexplicitly.Understandtheusersofthesoftwareanddevelopaprofileforeachusercategory.Developatestingplanthatemphasizes“rapidcycletesting.”什么样的指导原则导致成功的软件测试?Build“robust”softwarethatisdesignedtotestitselfUseeffectivetechnicalreviewsasafilterpriortotestingConducttechnicalreviewstoassesstheteststrategyandtestcasesthemselves.Developacontinuousimprovementapproachforthetestingprocess.1717.3.1UnitTestingmoduletobetestedtestcasesresultssoftwareengineer单元测试侧重于软件设计的最小单元(软件构件或模块)的验证工作。18UnitTestinginterfacelocaldatastructuresboundaryconditionsindependentpathserrorhandlingpathsmoduletobetestedtestcases测试模块的接口是为了保证被测程序单元的信息能够正常的流入和流出;检查局部数据结构以确保临时存储的数据在算法的整个执行过程中能维护其完整性。测试边界条件以确保模块在到达边界值的极限或受限处理的情形下仍能正确执行。走遍控制结构中的所有独立路径(基本路径)以确保模块中的所有语句至少执行一次。对所有的错误处理路径进行测试。19UnitTestEnvironmentModulestubstubdriverRESULTSinterfacelocaldatastructuresboundaryconditionsindependentpathserrorhandlingpathstestcases由于构件(模块)并不是独立的程序,因此,必须为每个测试单元开发驱动软件和(或)桩软件驱动程序只是一个“主程序”,它接收测试用例数据,将这些数据传递给(将要测试的)构件并打印相关结果。桩程序的作用是替换那些从属于将要测试的构件或被其调用的构件。当构件具有高内聚时,可简化单元测试。2017.3.2IntegrationTestingStrategiesOptions:•the“bigbang”approach•anincrementalconstructionstrategy集成测试是构造软件体系结构的系统化技术,同时,也是进行一些旨在发现与接口相关的错误的测试。其目标是利用已通过单元测试的构件建立设计中描述的程序结构。“一步到位”的方式构造程序:所有的构件都事先连接在一起,全部程序作为一个整体进行测试。增量集成:程序以小增量的方式逐步进行构造和测试,这样错误易于分离和纠正,更易于对接口进行彻底测试,而且可以运用系统化的测试方法。21TopDownIntegrationtopmoduleistestedwithstubsstubsarereplacedoneatatime,depthfirstasnewmodulesareintegrated,somesubsetoftestsisre-runABCDEFG22Bottom-UpIntegrationdriversarereplacedoneatatime,depthfirstworkermodulesaregroupedintobuildsandintegratedABCDEFGcluster23RegressionTestingRegressiontestingisthere-executionofsomesubsetofteststhathavealreadybeenconductedtoensurethatchangeshavenotpropagatedunintendedsideeffectsWheneversoftwareiscorrected,someaspectofthesoftwareconfiguration(theprogram,itsdocumentation,orthedatathatsupportit)ischanged.Regressiontestinghelpstoensurethatchanges(duetotestingorforotherreasons)donotintroduceunintendedbehaviororadditionalerrors.Regressiontestingmaybeconductedmanually,byre-executingasubsetofalltestcasesorusingautomatedcapture/playbacktools.24SmokeTestingAcommonapproachforcreating“dailybuilds”forproductsoftwareSmoketestingsteps:Softwarecomponentsthathavebeentranslatedintocodeareintegratedintoa“build.”•Abuildincludesalldatafiles,libraries,reusablemodules,andengineeredcomponentsthatarerequiredtoimplementoneormoreproductfunctions.Aseriesoftestsisdesignedtoexposeerrorsthatwillkeepthebuildfromproperlyperformingitsfunction.•Theintentshouldbetouncover“showstopper”errorsthathavethehighestlikelihoodofthrowingthesoftwareprojectbehindschedule.Thebuildisintegratedwithotherbuildsandtheentireproduct(initscurrentform)issmoketesteddaily.•Theintegrationapproachmaybetopdownorbottomup.2617.4Object-OrientedTestingbeginsbyevaluatingthecorrectnessandconsistencyoftheanalysisanddesignmodelstestingstrategychangestheconceptofthe‘unit’broadensduetoencapsulationintegrationfocusesonclassesandtheirexecutionacrossa‘thread’orinthecontextofausagescenariovalidationusesconventionalblackboxmethodstestcasedesigndrawsonconventionalmethods,butalsoencompassesspecialfeaturesTheseslidesaredesignedtoaccompanySoftwareEngineering:APractitioner’sApproach,7/e(McGraw-Hill2009).Slidescopyright2009byRoge
本文标题:软件过程与管理chapter_17软件测试策略XXXX0329
链接地址:https://www.777doc.com/doc-834537 .html