您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > Model-based testing through a GUI
Model-BasedTestingThroughaGUIAnttiKervinen1,MikaMaunumaa1,TuulaPääkkönen2,andMikaKatara11TampereUniversityofTechnology,InstituteofSoftwareSystemsP.O.Box553,FI-33101Tampere,FINLAND{firstname.lastname}@tut.fi2NokiaTechnologyPlatformsP.O.Box68,FI-33721Tampere,FINLANDAbstract.Sofar,model-basedtestingapproacheshavemostlybeenusedintest-ingthroughvariouskindsofAPIs.Inpractice,however,testingthroughaGUIisanotherequallyimportantapplicationarea,whichintroducesnewchallenges.Inthispaper,weintroduceanewmethodologyformodel-basedGUItesting.ThisincludesusingLabeledTransitionSystems(LTSs)inconjunctionwithac-tionwordandkeywordtechniquesfortestmodeling.Wehavealsoconductedanindustrialcasestudywherewetestedamobiledeviceandwereabletondprevi-ouslyunreporteddefects.ThetestenvironmentincludedastandardMSWindowsGUItestingtoolaswellascomponentsimplementingourapproach.Assessmentoftheresultsfromanindustrialpointofviewsuggestsdirectionsforfuturede-velopment.1IntroductionSystemtestingthroughaGUIcanbeconsideredasoneofthemostchallengingtypesoftesting.Itisoftendonebyaseparatetestingteamofdomainexpertsthatcanvalidatethattheclients'requirementshavebeenfullled.However,thedomainexpertsoftenlackprogrammingskillsandrequireeasy-to-usetoolstosupporttheirwork.Comparedtoapplicationprogramminginterface(API)testing,GUItestingismademorecomplexbythevarioususerinterfaceissuesthatneedtobedealtwith.Suchissuesincludein-putofusercommandsandinterpretationoftheoutputresults,forinstance,usingtextrecognitioninsomecases.DevelopersareoftenreluctanttoimplementsystemlevelAPIsonlyforthepurposesoftesting.Moreover,general-purposetestingtoolsneedtobeadaptedtousesuchAPIs.Incontrast,aGUIisoftenavailableandthereareseveralgeneral-purposeGUItest-ingtools,whichcanbeeasilytakenintouse.Amongthetestautomationcommunity,however,GUItestingtoolsarenotconsideredanoptimalsolution.Thisislargelyduetobadexperiencesinusingso-calledcapture/replaytoolsthatcapturekeypresses,aswellasmousemovement,andreplaythoseinregressiontests.Thebadexperiencesaremostlyinvolvedwithhighmaintenancecostsassociatedwithsuchatool[1].TheGUIisoftenthemostvolatilepartofthesystemandpossiblechangestoitaffecttheGUItestautomationscripts.Intheworstcase,theselectedcapture/replaytoolusesbitmapcomparisonstoverifytheresultsofthetestruns.Falsenegativeresultscanthenbeobtainedfromminorchangesinthelookandfeelofthesystem.Inpractice,suchtestautomationneedsmaintenancewhenevertheGUIischanged.ThestateoftheartinGUItestingisrepresentedbyso-calledkeywordandactionwordtechniques[2,3].Theyhelpinmaintenanceproblemsbyprovidingaclearsepa-rationofconcernsbetweenbusinesslogicandtheGUInavigationneededtoimplementthelogic.Keywordscorrespondtokeypressesandmenunavigation,suchasclicktheOKbutton,whileactionwordsdescribeusereventsatahigherlevelofabstraction.Forinstance,asingleactionwordcanbedenedtoopenaselectedlewhosenamecanbegivenasaparameter.Theideaisthatdomainexpertscandesignthetestcaseseasilyusingactionwordsevenbeforethesystemimplementationhasbeenstarted.TestautomationengineersthendenethekeywordsthatimplementtheactionwordsusingthescriptinglanguageprovidedbytheGUIautomationtool.Althoughsometoolsusesmartercomparisontechniquesthanpurebitmaps,andprovideadvancedtestdesignconcepts,suchaskeywordsandactionwords,themain-tenancecostscanstillbesignicant.Moreover,suchtoolsseldomndnewbugsandreturntheinvestmentonlywhenthesametestsuitesarerunseveraltimes,suchasinregressiontesting.Thebasicproblemisinthestaticandlinearnatureofthetestcases.Evenifonly10%ofthetestcaseswouldneedtobeupdatedwheneverthesystemundertestchanges,thiscanmeanmodifyingonehundredtestcasesfromthetestsuiteofonethousandregressiontests.OurgoalistoimprovethestatusofGUItestingwithmodel-basedtechniques.Firstly,byusingtestmodelstogeneratetestruns,wewillnotrunintodifcultieswithmaintaininglargetestsuites.Secondly,wehavebetterchancesofndingpreviouslyundetecteddefects,sinceweareabletovarytheorderofevents.Towardstheseends,weproposeatestautomationapproachbasedonLabeledTransitionSystems(LTSs)aswellasactionwordsandkeywords.TheideaistodescribeatestmodelasaLTSwhosetransitionscorrespondtoactionwords.Thisshouldbemadeaseasyaspossibleforalsotesterswithnoprogrammingskills.Themaintenanceeffortshouldlocalizetoasinglemodelorfewcomponentmodels.Theactionmachinesweintroducearecomposedinparallelwithrenementmachinesmappingtheactionwordstosequencesofkeywords.TheresultingcompositeLTSisthenreadintoageneral-purposeGUItestingtoolthatinterpretsthekeywordsandwalksthroughthemodelusingsomeheuristics.Thetoolalsoveriesthetestresultsandhandlesthereporting.Thecontributionsofthispaperareinformalizingtheabovescheme,introducingnoveltestmodelarchitectureandapplyingtheapproachinanindustrialcasestudy.Finally,wehaveassessedtheresultsfromanindustrialpointofview.Therestofthepaperisstructuredasfollows.Sections2and3describeourapproachindetailaswellasthecasestudywehaveconducted.TheassessmentoftheresultsisgiveninSection4.RelatedworkisdiscussedinSection5andconclusionsdrawninSection6.2BuildingaTestModelArchitectureInthefollowing,wewilldevelopal
三七文档所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
本文标题:Model-based testing through a GUI
链接地址:https://www.777doc.com/doc-3973174 .html