{"id":12181,"date":"2013-09-12T19:38:31","date_gmt":"2013-09-12T19:38:31","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=3121"},"modified":"2022-08-05T18:04:33","modified_gmt":"2022-08-05T18:04:33","slug":"qc-connect-excel-macro","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2013\/09\/qc-connect-excel-macro\/","title":{"rendered":"HP Quality Center – Connect to HP QC using Excel VBA"},"content":{"rendered":"
[et_pb_section fb_built=”1″ admin_label=”section” _builder_version=”4.16″ global_colors_info=”{}” da_is_popup=”off” da_exit_intent=”off” da_has_close=”on” da_alt_close=”off” da_dark_close=”off” da_not_modal=”on” da_is_singular=”off” da_with_loader=”off” da_has_shadow=”on” da_disable_devices=”off|off|off”][et_pb_row admin_label=”row” _builder_version=”4.16″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” global_colors_info=”{}”][et_pb_column type=”4_4″ _builder_version=”4.16″ custom_padding=”|||” global_colors_info=”{}” custom_padding__hover=”|||”][et_pb_text _builder_version=”4.17.6″ _module_preset=”default” hover_enabled=”0″ sticky_enabled=”0″]Dear Reader,<\/p>\n
This is the first article of HP QC VBA Tutorial.<\/span> In this article I will show you the first step which you should know before doing any automation related to Quality Center using Excel Macro. That first step is nothing but connecting to the Quality Center using excel macro. As you might have seen on the Quality Center UI (User Interface), Login to Quality Center consists of two steps:<\/p>\n <\/p>\n In the same way, QC connection using VBA is also done in 2 steps: Note: URL which you are passing, should always be till https:\/\/<server url>\/qcbin<\/strong> only.<\/i><\/span><\/p>\n Using the above code, now you are connected with the Quality center for a given Domain and project. Object tdConnection<\/strong><\/span> as defined above can be used to access each and every objects available in the Quality Center, like Test Cases, Requirements, Defects etc.<\/p>\n In the coming articles, we will learn more about the objects inside the quality center after authentication is successful. [\/et_pb_blurb][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n<\/span>","protected":false},"excerpt":{"rendered":" Dear Reader, This is the first article of HP QC VBA Tutorial. In this article I will show you the first step which you should know before doing any automation related to Quality Center using Excel Macro. That first step is nothing but connecting to the Quality Center using excel macro. As you might have […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1675,1677],"tags":[],"class_list":["post-12181","post","type-post","status-publish","format-standard","hentry","category-excel-macro-for-beginners","category-hp-qc"],"yoast_head":"\n\n
\n
\n
\n
\nFirst Authenticate your credentials (User ID and Password)
\nThen connect to QC using Domain and Project names.<\/p>\n\nSub ConnectToQualityCenter()\n\nDim qcURL As String\nDim qcID As String\nDim qcPWD As String\nDim qcDomain As String\nDim qcProject As String\nDim tdConnection As Object\n\nOn Error GoTo err\n qcURL = <QC URL> 'Example : https:\/\/<server url>\/qcbin\n qcID = <your User ID>\n qcPWD = <Your password>\n qcDomain = <Domain Name>\n qcProject = <Project Name>\n'Display a message in Status bar\n Application.StatusBar = \"Connecting to Quality Center.. Wait...\"\n' Create a Connection object to connect to Quality Center\n Set tdConnection = CreateObject(\"TDApiOle80.TDConnection\")\n'Initialise the Quality center connection\n tdConnection.InitConnectionEx qcURL\n'Authenticating with username and password\n tdConnection.Login qcID, qcPWD\n'connecting to the domain and project\n tdConnection.Connect qcDomain, qcProject\n'On successfull login display message in Status bar\n Application.StatusBar = \"........QC Connection is done Successfully\"\n Exit Sub\nerr:\n'Display the error message in Status bar\nApplication.StatusBar = err.Description\nEnd Sub\n<\/code><\/pre>\n
\n[\/et_pb_text][et_pb_blurb _builder_version=”4.17.6″ _module_preset=”5aa1bb27-c61b-41a1-b1dc-3feced0f8b7b” title=”You may also like these articles:” use_icon=”on” font_icon=”||fa||900″ hover_enabled=”0″ sticky_enabled=”0″]<\/p>\n\n