EMOS Framework Article.docx

上传人:b****8 文档编号:9652653 上传时间:2023-02-05 格式:DOCX 页数:18 大小:376.46KB
下载 相关 举报
EMOS Framework Article.docx_第1页
第1页 / 共18页
EMOS Framework Article.docx_第2页
第2页 / 共18页
EMOS Framework Article.docx_第3页
第3页 / 共18页
EMOS Framework Article.docx_第4页
第4页 / 共18页
EMOS Framework Article.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

EMOS Framework Article.docx

《EMOS Framework Article.docx》由会员分享,可在线阅读,更多相关《EMOS Framework Article.docx(18页珍藏版)》请在冰豆网上搜索。

EMOS Framework Article.docx

EMOSFrameworkArticle

EMOSFramework:

FunctionalTestingBasedonGUI-Modelling

DeanRajovic

EMOSComputerConsultingGmbH

Oskar-Messter-Str.25

85737IsmaningbyMunich

Germany

ABSTRACT

InthispaperwediscusstheroleofGUI-modellingintheareaoffunctionaltestingandpresentaframeworkforthedevelopmentandexecutionofautomatedfunctionaltestsbasedonsuchmodelling.Themainissuesaddressedbytheframeworkare:

rapidtestdevelopment,intensiveinvolvementofnon-technicalpersonnelintestautomationandmaintainabilityofthetestenvironmentthatscaleswellforlargesystems.

ThemainfeaturesofourapproachtoGUI-modellingarereducingGUIoperationstotheirSET(enter)andCHK(verify)alternativesandcapturingthenavigationasanintrinsicpartofthetestdescription.Throughasimplelinkageconcept,anextremelyhighlevelofreusabilityoftestdataandtestcodeisachieved.

ThetechnicalimplementationisrealisedwiththepopulartesttoolWinRunner®fromMercuryInteractiveandisavailableundertheLesserGeneralPublicLicence(LGPL).Theconceptisapplicabletopracticallyanyapplicationdesignedforintensivedatamaintenancevia"standard"GUIobjects.Ithasbeensuccessfullyappliedtoseveralhighlycomplextestautomationendeavoursinbrancheslikeinsurance,bankingandtelecommunications.

KEYWORDS:

testing,testautomation,functionaltesting,testframework,WinRunner

1

INTRODUCTION

Therearemanychallengesintestingcomplexsystems.Automatingtestsinsuchenvironmentsreducessomeofthembutintroducesadditionalones.Testswhicharesuitableformanualtestingarenotnecessarilysuitablefortestautomation(providedtheyhavebeenspecified/writtenatall).Thesheeramountofpossibletestcasescanscareeventhemostexperiencedtestmanager/specialist.Especiallywhensuchtestsaretobecarriedoutwithhopelesslyunderstaffedtestteamsandwithinridiculoustimeframes...[5]Organisingnumeroustestartefactsintoamaintainablecomplexthatsurviveslongenoughtoproveitsusefulnessisaverychallengingtask[3,4,6,7,8].

Themostcommonapproachtofunctionaltestingisbyexercisingtheapplicationthroughitsuserinterface.AutomationoffunctionaltestssimplycannotignoretheGUI-orientedtesttoolsfromvendorssuchasMercuryInteractive,Rational,Segue,Compuware,etc.Althoughthesetoolsarecapableofimplementingverycomplexapproaches,advancedusersseemtobeleftalonetodiscovertheadvancedtechniquesontheirown.

ItdoesnottakemuchbrowsingthroughtheliteratureorintheInternettodiscoverthatmanypeoplefoundtheirownsolutions[1,2,3,8].Thesesolutionsalwaysseemtofollowthesamepath:

fromcapture/replay(record/playback)viascriptinganddata-driventestingtotestframeworks.Duetothelackoffirmtheoreticfundamentsthatcouldguaranteetheiruniversalapplicability(whichisprobablythereasonnoneoftheleadingtoolvendorsoffersuchframeworks),theseframeworkspairtheirowntestingmethodologywiththetechnicalsupportforit.Nevertheless,theyalltrytosolvethesameproblem:

makethetestautomationmoreeffectiveandmoreefficient.

Whenitcomestotestingviatheapplication'suserinterface,theseframeworksappeartousethesameapproach:

eachmodelsthetestdesigninitsownwayandprovidesaninterfacetoone(ormore)standardGUI-centredtesttoolthatexecutesthetests.ThemostinfluentialtestframeworksofarisprobablytheCMG'sTestFrame®[1].Thisisthepowerfulframeworkbasedonakeyword-drivenseparation(intheirterminology:

"actionwords")betweenthetestdata("testclusters")andthetestscripts.Themostimportantcommonpropertyofalmostalloftheapproachesatthismaturitylevelistheseparationofthetestdatafromthetestscripts.Themoreadvancedtheseparation,themoreadvancedtheconcept(e.g.simpledata-drivenversuskeyword-drivenapproach).

2THE“BUSINESSCASESYNDROME”

Advancedconceptsattempttoexpressthetestcasesintermsofbusinessprocesses:

thehigh-levelabstractionsthathidetheiractualimplementationasmuchaspossible.Thepromisedbenefitsofsuch"businessmodelling"includetheindependenceoftheparticularuserinterface,increasedcomprehensiontonon-programmersandimprovedrequirements/designcoverage.

Howevertheseparationofscriptsanddatahasitscosts.Thecloserwegettothe"businesslanguage",thebiggerthegaptotheactualtestimplementation.Underthepremisethatweattempttoignoretheparticularuserinterface,itbecomesincreasinglymoredifficulttofindreusablecodepatternsthatrelatetosuch"businesslanguage".Suchpatternshoweverarefundamentaltobridgingthegapbetweenbusinessmodelsandtheirimplementation.

Businessprocessesarerarelysimple.Theproblemisoften"solved"bychunkingbigtransactionsintosmallerpartsand/orbyreducingtheinformationthathasactuallybeentested.Weoftenseefunctionslikeenter_xxx(...),delete_xxx(...)andmodify_xxx(...)accompaniedwiththeclaimtheytestthegivenbusinessprocesses.Thequestionsiswhethertheyreallydo.

Thetestcodemustbeflexible.Amongotherthingsitshouldbeabletoenterandcheckvalidsituations,provokeerrors,takealternative,unusualorillegalpathsthroughtheapplication,handledynamic(context-sensitive)partsoftheapplicationandcheckthereactionoftheapplicationatmanydifferentplaces.Thepurposeofthiscodeistesting.Itshouldserveasa"playground"forimplementingtestideas.Itshouldbeabletomirrorthebehaviouroftherealhuman(anddestructive)testerasmuchaspossible.Thiscannotbeachievedwithacodeinwhichmanydecisionsarehardcoded.Whenanalternative"route"isneededorwhenthingsgetchanged(astheyinevitablydowithtesting)onemustmakeadaptationssomewheretogetthecodeworking.Questionsthatariseare:

∙Wheretoadapt?

∙Whocanadaptit?

∙Howmuchdoesitcost(time/money)toadapt?

Atestautomationexpert(testprogrammer,toolspecialist)ispermanentlyforcedtomakedecisionsaboutwhatinformationtomakepublic(i.e.makeita"businesscase")andwhatinformationto"bury"intothetestscripts.Thetradeoffisthattheinformationwhichismadepubliccan(usually)bechangedbynon-programmers(domainexperts,endusers,testers)whereasthe"buried"informationrequiresprogrammingexpertisetochange.Simplechangesintheapplication'suserinterfacecaneasilyaffectplenty(hundreds)oftestcasesiftheinformationisexposedoronlyafewlinesofcodeiftheinformationishidden.Obviously,acarefulbalancemustbefound.However,itisagamble!

Moreoftenthanwewouldlike,changesaffectbothexposedorhiddeninformationregardlessofour"clever"balancing.Thosewhoknowthetricksoftestautomationwillappeartobe"luckier"thantheothers.

Themainbenefitoftestframeworksisinprovidingguidelinesforthosewhousethem(testdesigners,testprogrammers,endusers,systemdesigners,etc.).Agoodtestframeworkprovidesgoodanswerstomanydifficultquestions.Theareathatstillrequiresplentyofresearchisinfindinganeffectivewayofexpressing(orevengenerating)testcasesthataresufficientlylegibleforhumansaswellasmachines.

3GUIHASITALL

Inourapproach,weconsciouslydigressfromthecommonlyacceptedpracticeofexpressingtestcasesinawaywhichis"independent"oftheparticularuserinterface.Tothecontrary,weconcentrateontheapplication'sinterfaceforthefollowingreasons:

∙itistheaspectthatnoneofthefunctionaltestautomationapproachescanignore,

∙itistheonlycommonplatformfordiscussionssuitabletoallparties,

∙itistheprimaryareaofinteresttomostexpertusersandtestmanagers,and

∙itisindeedsuitableforexpressing(functional)testcases.

Ourexperiencehasshownthatbymodellingtheuserinterfaceweareabletoexpressthe"businesscases"whilepreservingmostoftheotherbenefitsof"businessmodelling"(separationoftestsandscripts,increasedcomprehensiontonon-programmers,maintainability,scalability)andprovidefortheextremelyrapidandrobusttestautomation.Theapproachisparticularlywell-suitedforapplicationswithcomplexuserinterfacefocusedondatamaintenance.Thiscoversaverybroadrangeofbusinessapplicationsinpracticallyallbranches.

Thebasicobjectivesofourapproachare:

∙itmustbesetupquickly,

∙itmustrapidlyevolve(newtestcasesmustbeadoptedquickly),

∙itmusteventuallyscaletoaccommodatehugesystems,

∙itmustbeableto"live"long(maintainableovermanyproductcycles),and

∙itmustbeuseful(testwhatwasintendedtobetested).

OurGUI-modellingideaisbasedonaprettyhereticalhypothesis.Ifthereisaneditfieldontheapplication'sGUI,allthatafunctionaltestwilldowithitistoenter,retrieve/checkorignoreitscontent.(Onemayarguethatthefieldattributes(label,position,enabled/disabled,etc.)alsoneedtobechecked.Thismaybetrue.However,comparedtotheoperationsonthefield'scontent,theoperationsonfield'sattributesarerare.Forthisreason,weconcentrateonthecontent.Nevertheless,wedoknowhowtohandleboth.)

ThesameholdstrueformostoftheotherGUIobjecttypes.Forexample,apushbuttonwillbepressedorignored,acheckboxwillbesetorcheckedwhetheritisset,elementsoflistboxeswillbeselectedorcheckedfortheirpresence,etc.Inotherwords,foreveryGUIobjecttypethereareonlyafewoperationsthatneedtobeappliedinordertoperformmostofthefunctionaltesting.

ThefirstmostimportantconceptofEMOSframeworkisthattheGUIofanapplicationisexercisedwithoperationsineitherSE

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1