软件测试QTP面试题Word文档下载推荐.docx
《软件测试QTP面试题Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《软件测试QTP面试题Word文档下载推荐.docx(5页珍藏版)》请在冰豆网上搜索。
软件测试QTP面试题回答:
1.WhataretheFeaturesBenefitsofQuickTestPro(QTP8.0)Operatesstand-alone,orintegratedintoMercuryBusinessProcessTestingandMercuryQualityCenter.Introducesnext-generationzero-configurationKeywordDriventestingtechnologyinQuickTestProfessional8.0allowingforfasttestcreation,easiermaintenance,andmorepowerfuldata-drivingcapability.IdentifiesobjectswithUniqueSmartObjectRecognition,eveniftheychangefrombuildtobuild,enablingreliableunattendedscriptexecution.CollapsestestdocumentationandtestcreationtoasinglestepwithAuto-documentationtechnology.Enablesthoroughvalidationofapplicationsthroughafullcomplementofcheckpoints.
2.HowtohandletheexceptionsusingrecoveryscenariomanagerinQTPThereare4triggereventsduringwhicharecoveryscenarioshouldbeactivated.Apopupwindowappearsinanopenedapplicationduringthetestrun:
Apropertyofanobjectchangesitsstateorvalue,Astepinthetestdoesnotrunsuccessfully,Anopenapplicationfailsduringthetestrun,Thesetriggersareconsideredasexceptions.YoucaninstructQTPtorecoverunexpectedeventsorerrorsthatoccurredinyourtestingenvironmentduringtestrun.Recoveryscenariomanagerprovidesawizardthatguidesyouthroughthedefiningrecoveryscenario.Recoveryscenariohasthreesteps:
1.TriggeredEvents2.Recoverysteps3.PostRecoveryTest-Run
3.WhatistheuseofTextoutputvalueinQTPOutputvaluesenabletoviewthevaluesthattheapplicationtalksduringruntime.Whenparameterized,thevalueschangeforeachiteration.Thusbycreatingoutputvalues,wecancapturethevaluesthattheapplicationtakesforeachrunandoutputthemtothedatatable.
4.HowtousetheObjectspyinQTP8.0versionTherearetwowaystoSpytheobjectsinQTP:
1)Thrufiletoolbar,IntheFileToolbarclickonthelasttoolbarbutton(aniconshowingapersonwithhat).2)TrueObjectrepositoryDialog,InObjectrepositorydialogclickonthebuttonobjectspy.IntheObjectspyDialogclickonthebuttonshowinghandsymbol.Thepointernowchangesintoahandsymbolandwehavetopointouttheobjecttospythestateoftheobjectifatalltheobjectisnotvisible.orwindowisminimizedthen,holdtheCtrlbuttonandactivatetherequiredwindowtoandreleasetheCtrlbutton.
5.HowdoesRuntimedata(Parameterization)ishandledinQTPYoucanthenentertestdataintotheDataTable,anintegratedspreadsheetwiththefullfunctionalityofExcel,tomanipulatedatasetsandcreatemultipletestiterations,withoutprogramming,toexpandtestcasecoverage.Datacanbetypedinorimportedfromdatabases,spreadsheets,ortextfiles.
6.WhatiskeywordviewandExpertviewinQTP-QuickTestsKeywordDrivenapproach,testautomationexpertshavefullaccesstotheunderlyingtestandobjectproperties,viaanintegratedscriptinganddebuggingenvironmentthatisround-tripsynchronizedwiththeKeywordView.AdvancedtesterscanviewandedittheirtestsintheExpertView,whichrevealstheunderlyingindustry-standardVBScriptthatQuickTestProfessionalautomaticallygenerates.AnychangesmadeintheExpertViewareautomaticallysynchronizedwiththeKeywordView.
7.ExplainabouttheTestFusionReportofQTPOnceatesterhasrunatest,aTestFusionreportdisplaysallaspectsofthetestrun:
ahigh-levelresultsoverview,anexpandableTreeViewofthetestspecifyingexactlywhereapplicationfailuresoccurred,thetestdataused,applicationscreenshotsforeverystepthathighlightanydiscrepancies,anddetailedexplanationsofeachcheckpointpassandfailure.BycombiningTestFusionreportswithQuickTestProfessional,youcansharereportsacrossanentireQAanddevelopmentteam.
8.WhichenvironmentsdoesQTPsupport-QuickTestProfessionalsupportsfunctionaltestingofallenterpriseenvironments,includingWindows,Web,..NET,Java/J2EE,SAP,Siebel,Oracle,PeopleSoft,VisualBasic,ActiveX,mainframeterminalemulators,andWebservices.
9.WhatisQTP-QuickTestisagraphicalinterfacerecord-playbackautomationtool.Itisabletoworkwithanyweb,javaorwindowsclientapplication.QuickTestenablesyoutoteststandardwebobjectsandActiveXcontrols.Inadditiontotheseenvironments,QuickTestProfessionalalsoenablesyoutotestJavaappletsandapplicationsandmultimediaobjectsonApplicationsaswellasstandardWindowsapplications,VisualBasic6applicationsand.NETframeworkapplications.
10.ExplainQTPTestingprocessQuickTesttestingprocessconsistsofthefollowingmainphases:
1.CreatingyourtestplanPriortoautomatingthereshouldbeadetaileddescriptionofthetestincludingtheexactstepstofollow,datatobeinput,andallitemstobeverifiedbythetest.Theverificationinformationshouldincludebothdatavalidationsandexistenceorstateverificationsofobjectsintheapplication.
2.RecordingasessiononyourapplicationAsyounavigatethroughyourapplication,QuickTestgraphicallydisplayseachstepyouperformintheformofacollapsibleicon-basedtesttree.Astepisanyuseractionthatcausesormakesachangeinyoursite,suchasclickingalinkorimage,orenteringdatainaform.
3.EnhancingyourtestInsertingcheckpointsintoyourtestletsyousearchforaspecificvalueofapage,objectortextstring,whichhelpsyouidentifywhetherornotyourapplicationisfunctioningcorrectly.NOTE:
CheckpointscanbeaddedtoatestasyourecorditorafterthefactviatheActiveScreen.Itismucheasierandfastertoaddthecheckpointsduringtherecordingprocess.Broadeningthescopeofyourtestbyreplacingfixedvalueswithparametersletsyoucheckhowyourapplicationperformsthesameoperationswithmultiplesetsofdata.Addinglogicandconditionalstatementstoyourtestenablesyoutoaddsophisticatedcheckstoyourtest.
4.DebuggingyourtestIfchangesweremadetothescript,youneedtodebugittocheckthatitoperatessmoothlyandwithoutinterruption.
5.RunningyourtestonanewversionofyourapplicationYourunatesttocheckthebehaviorofyourapplication.Whilerunning,QuickTestconnectstoyourapplicationandperformseachstepinyourtest.
6.AnalyzingthetestresultsYouexaminethetestresultstopinpointdefectsinyourapplication.
7.ReportingdefectsAsyouencounterfailuresintheapplicationwhenanalyzingtestresults,youwillcreatedefectreportsinDefectReportingTool.
11.ExplaintheQTPToolinterface-Itcontainsthefollowingkeyelements:
Titlebar,displayingthenameofthecurrentlyopentest,Menubar,displayingmenusofQuickTestcommands,Filetoolbar,containingbuttonstoassistyouinmanagingtests,Testtoolbar,containingbuttonsusedwhilecreatingandmaintainingtests,Debugtoolbar,containingbuttonsusedwhiledebuggingtests.Note:
TheDebugtoolbarisnotdisplayedwhenyouopenQuickTestforthefirsttime.YoucandisplaytheDebugtoolbarbychoosingView.Toolbars.Debug.Actiontoolbar,containingbuttonsandalistofactions,enablingyoutoviewthedetailsofanindividualactionortheentiretestflow.Note:
TheActiontoolbarisnotdisplayedwhenyouopenQuickTestforthefirsttime.YoucandisplaytheActiontoolbarbychoosingView.Toolbars.Action.Ifyouinsertareusableorexternalactioninatest,theActiontoolbarisdisplayedautomatically.Testpane,containingtwotabstoviewyourtest-theTreeViewandtheExpertView,TestDetailspane,containingtheActiveScreen.DataTable,containingtwotabs,GlobalandAction,toassistyouinparameterizingyourtest.DebugViewerpane,containingthreetabstoassistyouindebuggingyourtest-WatchExpressions,Variables,andCommand.(TheDebugViewerpanecanbeopenedonlywhenatestrunpausesatabreakpoint.)Statusbar,displayingthestatusofthetest.
12.HowdoesQTPrecognizeObjectsinAUTQuickTeststoresthedefinitionsforapplicationobjectsinafilecalledtheObjectRepository.Asyourecordyourtest,QuickTestwilladdanentryforeachitemyouinteractwith.EachObjectRepositoryentrywillbeidentifiedbyalogicalname(determinedautomaticallybyQuickTest),andwillcontainasetofproperties(type,name,etc)thatuniquelyidentifyeachobject.EachlineintheQuickTestscriptwillcontainareferencetotheobjectthatyouinteractedwith,acalltotheappropriatemethod(set,click,check)andanyparametersforthatmethod(suchasthevalueforacalltothesetmethod).Thereferencestoobjectsinthescriptwillallbeidentifiedbythelogicalname,ratherthananyphysical,descriptiveproperties.
13.WhatarethetypesofObjectRepositoriesinQTPQuickTesthastwotypesofobjectrepositoriesforstoringobjectinformation:
sharedobjectrepositoriesandactionobjectrepositories.Youcanchoosewhichtypeofobjectrepositoryyouwanttouseasthedefaulttypefornewtests,andyoucanchangethedefaultasnecessaryforeachnewtest.Theobjectrepositoryper-actionmodeisthedefaultsetting.Inthismode,QuickTestautomaticallycreatesanobjectrepositoryfileforeachactioninyourtestsothatyoucancreateandruntestswithoutcreating,choosing,ormodifyingobjectrepositoryfiles.However,ifyoudomodifyvaluesinanactionobjectrepository,yourchangesdonothaveanyeffectonotheractions.Therefore,ifthesametestobjectexistsinmorethanoneactionandyoumodifyanobject.spropertyvaluesinoneaction,youmayneedtomakethesamechangeineveryaction(andanytest)containingtheobject.
14.ExplainthecheckpointsinQTPAcheckpointverifiesthatexpectedinformationisdisplayedinanApplicationwhilethetestisrunnin