QC OTA presentation

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ExtendingQCwithOpenTestArchitecture(OTA)APIPreparedby:IgorGershovichigershovich@connectedtesting.com(OTA)API?TheOpenTestArchitectureAPIisaCOMlibrarythatenablesyouto:integrateexternalapplicationswithQualityCenterinteractwiththeQualityCenterapplicationwithouthavingtousetheGUIfront-endinteractwiththeQCdatabasesbypassingDBAQCArchitecture3-tierarchitecture(Webserver,Appserver,DBserver)OTAAPIlocationThelibrary,OTAClient.dll,isautomaticallydownloadedtoyourworkstationthefirsttimeyourunQualityCentertothefollowingfolder:installationdrive\ProgramFiles\CommonFiles\MercuryInteractive\QualityCenterAlternatively,clicktheAdd-inspagelink,selectMercuryQualityCenterClientSideSetup,andclickDownloadAdd-in.HowtouseOTAAPI?ThereareseveralwaystouseOTAAPI:AddOTAcodewithinQCWorkflowscriptstoextendWorkflowcapabilitiesEnhanceQualityCenterVAPI-XPtestsUsingtheQCUtilobjectinQuickTestProWriteacustomtestexecutionprogramReadinformationfromaQCforusebyanexternaltoolorreportgeneratorIntegrateanythird-partytoolwithQCOTAObjectmodelAPIfunctionsTheAPIfunctionsareaccessiblethroughCOM-compatibleprogramminglanguages,suchasVisualBasic,VBScript,C++,C#,etc.TheAPIhasoneentrypoint-TDConnectionobjectImplementationexamples1.ExternalprogramtoscheduleQCtestsexecution–RunTestSet.exeCustomTestExecutionprogram–RunTestSet.exeQualityCenterdoesnothaveabuilt-intestsetschedulertoruntestsperiodicallyOTAAPIenablesuserstorunexternaltoolthatcanexecuteanytestsetonanyhostAsexampleRunTestSetapplication(withVC++sourcecode)coupledwithMicrosoftSchedulercanbeusedtoscheduletestsRunTestSet.execommandlinesyntaxRunTestSet/s:Server/n:Domain/d:Project/u:User/p:Password/f:TestSetFolder[/t:TestSet][/h:Host]|[/g:HostGroup]Where:/s:QCservername/n:QCDomain/d:QCProject/u:Username/p:Userpassword/f:TestSetFolderPath/t:[optional]TestSetname/h:[optional]Hostname/g:[optional]HostGroupname/m:[optional]QCUsernamewhowillreceiveexecutioneventnotificationmail/l[optional]runTestSetlocallyExample:RunTestSet.exe/s::default/d:access/u:admin/f:Root\hello/t:WRScript/lScheduleRunTestSet.exeexecutionExecutionEventNotificationEmail2.CustomReportingtoolCustomReportingtoolThistoolusesHTMLandVBScriptAsanexample,wearegoingtoruncustomqueriesagainstaQualityCenterprojectThesteps:ThistoolconnectstotheprojectusingOTAAPIExecutecustomDBqueriesDisplaysresultsProjectReportingtoolReportingtool-CodesnippetOTAAPITdConnection.CommandobjectusedtorunProjectDBqueriesSubCheckIntegritySetcmd=TdConnection.CommandTestIntegritySELECT*FROMBUGWHEREBG_SUBJECTNOTIN(SELECTAL_ITEM_IDFROMALL_LISTS),_defect(s)withoutsubject(noneexpected),0TestIntegritySELECT*FROMDESSTEPSWHEREDS_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_designstep(s)withouttest(noneexpected),0TestIntegritySELECT*FROMTESTCYCLWHERETC_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_test(s)intestsetwithouttestintestplan(noneexpected),0TestIntegritySELECT*FROMTESTCYCLWHERETC_CYCLE_IDNOTIN(SELECTCY_CYCLE_IDFROMCYCLE),_test(s)intestsetwithouttestset(noneexpected),0TestIntegritySELECT*FROMSTEPWHEREST_RUN_IDNOTIN(SELECTRN_RUN_IDFROMRUN),_step(s)withoutrun(noneexpected),0TestIntegritySELECT*FROMRUNWHERERN_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_run(s)withouttest(noneexpected),0TestIntegritySELECT*FROMRUNWHERERN_CYCLE_IDNOTIN(SELECTCY_CYCLE_IDFROMCYCLE),_run(s)withouttestset(noneexpected),0TestIntegritySELECT*FROMREQ_COVERWHERERC_REQ_IDNOTIN(SELECTRQ_REQ_IDFROMREQ),_requirementcoveragewithoutrequirement(noneexpected),0TestIntegritySELECT*FROMREQ_COVERWHERERC_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_requirementcoveragewithouttest(noneexpected),0TestIntegritySELECT*FROMCYCLEWHERECY_FOLDER_IDNOTIN(SELECTCF_ITEM_IDFROMCYCL_FOLD),_testset(s)withouttestsetfolder(1expected),1Setcmd=NothingEndSub3.EnhancingQCProjectWorkflowWorkflowScriptEditorModifiedProject_CanLoginfunctiontoblockuserswithoutpasswordLoginerrorforuserwithoutpassword4.UsingQTPQCUtilobjecttowritetoQCUser-DefinedfieldsQTPscriptusesQCUtilobjecttowriteFlightConfirmationNumbertoQCRN_USER_01andTC_USER_01fieldsWritingtoQCFieldsviaQTPQCUtilobjectTC_USER_01RN_USER_015.VAPI–XPScriptwithOTAAPICreateanewVAPI-XPtestScriptinglanguagesforVAPI-XPscriptVAPI-XPscriptstoringBugdatatoExcelspreadsheetBugdatastoredinExcelResourcesHPMercuryToolsSpecificweblogbyValeryRauletfromExpositLimited–QAForums–HP/MercuryQualityCenterOpenTestArchitectureAPIReferenceIgorGershovichE-Mail:igershovich@connectedtesting.comPhone:720-933-9395Website:

1 / 32
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功