数据库应用程序测试中英文对照外文翻译文献.docx

上传人:b****5 文档编号:6213744 上传时间:2023-01-04 格式:DOCX 页数:7 大小:22.99KB
下载 相关 举报
数据库应用程序测试中英文对照外文翻译文献.docx_第1页
第1页 / 共7页
数据库应用程序测试中英文对照外文翻译文献.docx_第2页
第2页 / 共7页
数据库应用程序测试中英文对照外文翻译文献.docx_第3页
第3页 / 共7页
数据库应用程序测试中英文对照外文翻译文献.docx_第4页
第4页 / 共7页
数据库应用程序测试中英文对照外文翻译文献.docx_第5页
第5页 / 共7页
点击查看更多>>
下载资源
资源描述

数据库应用程序测试中英文对照外文翻译文献.docx

《数据库应用程序测试中英文对照外文翻译文献.docx》由会员分享,可在线阅读,更多相关《数据库应用程序测试中英文对照外文翻译文献.docx(7页珍藏版)》请在冰豆网上搜索。

数据库应用程序测试中英文对照外文翻译文献.docx

数据库应用程序测试中英文对照外文翻译文献

中英文翻译

DatabaseApplicationTesting

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

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

当前位置:首页 > 党团工作 > 入党转正申请

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

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