数据库应用程序测试中英文对照外文翻译文献Word文档下载推荐.docx
- 文档编号:19218857
- 上传时间:2023-01-04
- 格式:DOCX
- 页数:7
- 大小:22.99KB
数据库应用程序测试中英文对照外文翻译文献Word文档下载推荐.docx
《数据库应用程序测试中英文对照外文翻译文献Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《数据库应用程序测试中英文对照外文翻译文献Word文档下载推荐.docx(7页珍藏版)》请在冰豆网上搜索。
1.Introduction
Databasesplayapivotalroleinalmosteveryorganizationintoday’sinformation-basedsociety.CommercialDatabasemanagementsystems(DBMSs)provideorganizationswithefficientaccesstohugeamountsofdatawithoutaffectingtheintegrityofdataandrelievingtheuseroftheanyneedtounderstandthelow-levelimplementationdetails.OvertheyearstremendouseffortshavebeendevotedtoensuringuseofefficientandintegrityprotectingdatastructuresandalgorithmsbyDBMSs.However,littlehasbeendonetodevelopsystematictechniquesforensuringcorrectnessofapplicationsusingtheseDBMSs.Manytestingtechniqueshavebeendevelopedtohelpensurethatbehaviourofaprogramisinaccordancewiththespecifications.However,thesetechniquesmostlytargetprogramswrittenintraditionalimperativelanguagesandcan’tbeofmuchhelpwhenitcomestodatabaseapplications.Likeanyotherprogram,databaseapplicationprogramcanbeviewedasanattempttoimplementafunction.Consideredthisway,boththeinputandoutputspacesofthisfunctionwillincludedatabasestateapartfromtheexplicitinputandoutputparametersoftheapplication.Thisaffectssubstantiallythewayatestcaseisdefined,generatedandexecutedtocheckcorrectnessofapplication.Hencethereisaneedfornewapproachesspecificallyorientedtowardstestingdatabaseapplications.
Testingdatabaseapplicationprogramsinvolvesthefollowingphases:
•Extractionofinformationfromdatabaseschema
•GenerationoftestdataandPopulatingtestdatabase
•Generationoftestcasesasinputtotheapplicationprogram
•Validationofdatabasestateandoutputafterexecution
Usinglivedatahasseverallimitations.Itmaynotreflectsufficientlywidevarietyofpossiblesituationsandevenifitdoes,itmightbedifficulttofindtheminalargedatabase.Secondly,privacyorsecurityconstraintsmightpreventtheuserfromseeingsensitivedata.Hence,variousmethodsforgeneratingsynthetictestdatahavebeenproposed.Whengeneratingdataandpopulatingthetestdatabase,itsimportanttogeneratevalidandinterestingdatae.g.itwouldbeadvisabletoselectdatasoastoincludesituationswhichthetesterbelievesarelikelytooccurorwillexposefaultsinapplication.Thetechniqueusedfortestdatagenerationwilldeterminetheextentofcoverageoftestdatabase.Selectingagoodinitialdatabasestatesoastoincludeawidevarietyofscenariosresemblingrealdatafortheparticularapplicationisverybeneficial.Sincedatabasestateplaysanimportantroleindeterminingtheoutput,ithastobecheckedaftereachexecutionthatonlythespecifiedmodificationsandnoneothershaveoccurred.
2.AGENDA-toolsetfortestingDBapplications
AGENDAisatoolsethasbeendesigned.AGENDAtakesasinputtheapplicationdatabaseschema,applicationsourcecodeandfilescontainingsamplevalueswhichcontainsuggestedvaluesfortheattributesprovidedbytheuser.Theuserinteractivelyselectstestheuristicsandprovidesinformationaboutexpectedbehaviouroftestcases.UsingthisinformationAGENDA,populatesthedatabase,generatesinputstotheapplication,executestheapplicationonthoseinputsandcheckssomeaspectsofcorrectnessoftheresultingdatabasestateandapplicationoutput.1
3.InputGenerator:
ItgeneratestheinputdatatobesuppliedtotheapplicationbyusinginformationderivedfromAgendaparserandStategeneratorinadditiontotheinformationgainedbyparsingtheSQLstatementsintheapplicationprogramandinformationusefulforcheckingtestresults.Informationderivedfromparsingthesourcecodemaybeusefulinsuggestinginputsthattestershouldsupplytotheapplication.Theinputgeneratorthusgeneratestestinputsbyinstantiatingtheinputparameterswithactualparameters.
4.StateValidator:
ThevalidatormonitorsthechangeinapplicationDBstateduringexecutionofatest.Itautomaticallylogsthechangesintheapplicationtablesandsemi-automaticallychecksthestatechange.
5.OutputValidator:
Itcapturestheapplication’soutputsandchecksthemagainstthequerypreconditionsandpostconditionsthathavebeengeneratedbythetoolorsuppliedbythetester.
6.DesignandImplementation
6.1Parsingtool
TheAgendaParsingtoolisbasedonPostgresSQLparser.PostgresSQLparsercreatesanAbstractSyntaxTreecontainingrelevantinformationabouttables,attributesandconstraintsfromagivenschema.However,thisinformationisspreadoutatdifferentlocationsinthetree.Inaddition,itispossibletohavedifferenttreestructureshavingthesameunderlyinginformationaboutthetables,becauseofuseofdifferentSQLDDLsyntacticconstructsexpressingthesameinformation.Consequently,theexactlocationofrelevantinformationdependsontheexactsyntaxofschemadefinition.SomeoftheinformationfromDBMS’sinternalcatalogtablesisneededbyothercomponentsofAGENDA.AllowingthemtodirectlyquerythesetableswouldhaveintroducedinterdependencybetweenAGENDAcomponentswhichisnotdesirable.HencealltheinformationthatneedstobeprocessedisstoredinAgendaDBwhichismadeavailabletoothercomponents.ThisdecouplingofPostgresSQLfromrestofthecomponentsallowsAGENDAtobeportedtodifferentDBMSjustbychangingtheParser.TheParserextractsinformationaboutintegrityconstraintssuchasuniquenessconstraints,referentialconstraintsandnotNULLconstraintsfromschema.Italsoextractslimitedinformationfromsemanticconstraints,particularlyboundaryvalues.Thisisveryusefulinautomaticdata-partitioningandinputgeneration.Next,theAgendaParserparsesthesample-valuefilescontaininguser-supplieddataandstoresthesamplevalues,theirdatagroupsandassociatedattributesintheAgendaDB.Attributesinvolvedincompositeconstraintsaremarkedsothattheycanbecorrectlyhandledbyinputgenerator.
7ExtensionstoAGENDA
7.1TestingWebDBapplications
WiththetremendousgrowthofWorldWideWeb,manynewweb-basedservicesthataredrivenbydatastoredindatabasesaregainingimportance.ExamplesincludeE-commerceapplicationssuchasonlinestores,andbusiness-to-businesssupportproducts.Someoftheseareofcriticalimportanceandhenceitisessentialtoensuretheircorrectfunctioning.MostwebDBapplicationsconsistofthreeslayers-atthebaseisDBMSandadatabase,atthetopisclientwebbrowserandinbetweenliestheapplicationlogic-usuallydevelopedwithaserver-sidescriptinglanguageorJavaextendedwithlibrarythatcaninterfacewithDBMSs,andcandecodeandproduceHTMLpagesdisplayedintheclientbrowser.Forawebapplicationatestcaseisconsideredasasequenceofpagestobevisitedalongwiththeinputvaluestobeprovidedtothepagescontainingforms.Thewhiteboxapproachinvolvesfollowingsteps:
1.Informationextractionfromapplicationsource:
UsefulinformationsuchasURLlinks(whichincludesallotherURLsthatcanbereachedfromthecurrentpage)andparameterinformation(name-valuepairsthatarepassedtotheServlet)foreachURLisextractedfromapplicationsource.URLsarepartitionedintotwocategoriesdependingontheircontent-staticanddata-based(dynamic)page.
2.Webapplicationgraphgenerationandpathselection:
Basedontheinformationextractedearlier,anapplicationgraph,whereeachnoderepresentsaURLandedgesrepresentURLlinks,isgeneratedandthensimplifiedaccordingtoURLlinktypes.ThereisanedgefromURLAtoURLBifURLAproducesalinktoURLBintheHTMLpageitgenerates.PathsthroughthegraphrepresentnaturalsequencesofexecutionofURLsasausernavigatesthroughthewebapplication.Hence,someofthesepathsareselectedastestcasestorepresentpossiblescenariosofuseoftheapplication.
3.InputGeneration:
Foreachpathselected,AGENDAisusedtogenerateinputsforeachURL.Thepathalongwithinputsconstituteatestcase.AnXMLfileisgeneratedcorrespondingtoeachsuchtestcase.
4.TestExecution:
TheXMLfileisparsedusingXMLparsertoextractURLinformationandthetestcaseisexecutedautomaticallyusingopensourceJakartaHttpClientintegratedwithAGENDA.Afterexecutionofeachupdateorinsertion,AGENDAchecksthenewdatabasestates.Outputpagesarecheckedbymanualinspectionorothertools.ThetoolinitscurrentformistargetedtotheJavaServletmodel,usingJDBCfordatabaseaccess,andmakessomeassumptionsaboutprogrammingstyle.However,thebasictechniquecanbeappliedtomoregeneralservletstylesandotherwebapplicationlanguages.
8.RegressionTestsForDatabaseApplications
Anyapplicationisconstantlygoingthroughtheprocessofevolutionsuchasitscomponentsgettingreplacedwithmorepowerfulcomponents,variousoptimizationsbeingincorporatedandsoon.Wheneversuchmodificationisintroducedinanapplication,itisimportanttocheckfortheintegrityoftheapplicationandthatisthepurposeofregressiontests.Therearevarioustoolsbuiltforautomatingtheregressiontestingprocedure,mostpopularbeingJUnitframeworkdevelopedforcarryingoutregressiontestsforJavaapplications.Databaseapplicationswhicharecomposedofmanylayersandstackedinvariouslayersare,inparticular,subjecttoconstantchangeforinstancere-engineeringofbusinessprocesses,authorizationrulesbeingchangedetc.Changingdatabaseapplicationsisverycostlyandinvolvesgreatdealofmanualworksincetherearen’tanytoolsavailablethatcanautomaticallycarryingoutregressiontestsonthem.
9.ConclusionsandFutureWork
TheAGENDAtoolsetwasdesignedandimplementedinrespo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据库 应用程序 测试 中英文 对照 外文 翻译 文献
![提示](https://static.bdocx.com/images/bang_tan.gif)