您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > QC OTA presentation
ExtendingQCwithOpenTestArchitecture(OTA)APIPreparedby:IgorGershovichigershovich@connectedtesting.com(OTA)API?TheOpenTestArchitectureAPIisaCOMlibrarythatenablesyouto:integrateexternalapplicationswithQualityCenterinteractwiththeQualityCenterapplicationwithouthavingtousetheGUIfront-endinteractwiththeQCdatabasesbypassingDBAQCArchitecture3-tierarchitecture(Webserver,Appserver,DBserver)OTAAPIlocationThelibrary,OTAClient.dll,isautomaticallydownloadedtoyourworkstationthefirsttimeyourunQualityCentertothefollowingfolder:installationdrive\ProgramFiles\CommonFiles\MercuryInteractive\QualityCenterAlternatively,clicktheAdd-inspagelink,selectMercuryQualityCenterClientSideSetup,andclickDownloadAdd-in.HowtouseOTAAPI?ThereareseveralwaystouseOTAAPI:AddOTAcodewithinQCWorkflowscriptstoextendWorkflowcapabilitiesEnhanceQualityCenterVAPI-XPtestsUsingtheQCUtilobjectinQuickTestProWriteacustomtestexecutionprogramReadinformationfromaQCforusebyanexternaltoolorreportgeneratorIntegrateanythird-partytoolwithQCOTAObjectmodelAPIfunctionsTheAPIfunctionsareaccessiblethroughCOM-compatibleprogramminglanguages,suchasVisualBasic,VBScript,C++,C#,etc.TheAPIhasoneentrypoint-TDConnectionobjectImplementationexamples1.ExternalprogramtoscheduleQCtestsexecution–RunTestSet.exeCustomTestExecutionprogram–RunTestSet.exeQualityCenterdoesnothaveabuilt-intestsetschedulertoruntestsperiodicallyOTAAPIenablesuserstorunexternaltoolthatcanexecuteanytestsetonanyhostAsexampleRunTestSetapplication(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.CustomReportingtoolCustomReportingtoolThistoolusesHTMLandVBScriptAsanexample,wearegoingtoruncustomqueriesagainstaQualityCenterprojectThesteps:ThistoolconnectstotheprojectusingOTAAPIExecutecustomDBqueriesDisplaysresultsProjectReportingtoolReportingtool-CodesnippetOTAAPITdConnection.CommandobjectusedtorunProjectDBqueriesSubCheckIntegritySetcmd=TdConnection.CommandTestIntegritySELECT*FROMBUGWHEREBG_SUBJECTNOTIN(SELECTAL_ITEM_IDFROMALL_LISTS),_defect(s)withoutsubject(noneexpected),0TestIntegritySELECT*FROMDESSTEPSWHEREDS_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_designstep(s)withouttest(noneexpected),0TestIntegritySELECT*FROMTESTCYCLWHERETC_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_test(s)intestsetwithouttestintestplan(noneexpected),0TestIntegritySELECT*FROMTESTCYCLWHERETC_CYCLE_IDNOTIN(SELECTCY_CYCLE_IDFROMCYCLE),_test(s)intestsetwithouttestset(noneexpected),0TestIntegritySELECT*FROMSTEPWHEREST_RUN_IDNOTIN(SELECTRN_RUN_IDFROMRUN),_step(s)withoutrun(noneexpected),0TestIntegritySELECT*FROMRUNWHERERN_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_run(s)withouttest(noneexpected),0TestIntegritySELECT*FROMRUNWHERERN_CYCLE_IDNOTIN(SELECTCY_CYCLE_IDFROMCYCLE),_run(s)withouttestset(noneexpected),0TestIntegritySELECT*FROMREQ_COVERWHERERC_REQ_IDNOTIN(SELECTRQ_REQ_IDFROMREQ),_requirementcoveragewithoutrequirement(noneexpected),0TestIntegritySELECT*FROMREQ_COVERWHERERC_TEST_IDNOTIN(SELECTTS_TEST_IDFROMTEST),_requirementcoveragewithouttest(noneexpected),0TestIntegritySELECT*FROMCYCLEWHERECY_FOLDER_IDNOTIN(SELECTCF_ITEM_IDFROMCYCL_FOLD),_testset(s)withouttestsetfolder(1expected),1Setcmd=NothingEndSub3.EnhancingQCProjectWorkflowWorkflowScriptEditorModifiedProject_CanLoginfunctiontoblockuserswithoutpasswordLoginerrorforuserwithoutpassword4.UsingQTPQCUtilobjecttowritetoQCUser-DefinedfieldsQTPscriptusesQCUtilobjecttowriteFlightConfirmationNumbertoQCRN_USER_01andTC_USER_01fieldsWritingtoQCFieldsviaQTPQCUtilobjectTC_USER_01RN_USER_015.VAPI–XPScriptwithOTAAPICreateanewVAPI-XPtestScriptinglanguagesforVAPI-XPscriptVAPI-XPscriptstoringBugdatatoExcelspreadsheetBugdatastoredinExcelResourcesHPMercuryToolsSpecificweblogbyValeryRauletfromExpositLimited–QAForums–HP/MercuryQualityCenterOpenTestArchitectureAPIReferenceIgorGershovichE-Mail:igershovich@connectedtesting.comPhone:720-933-9395Website:
本文标题:QC OTA presentation
链接地址:https://www.777doc.com/doc-3170545 .html