It is used to enable inter-process communication and dynamic object creation in any programming language that supports the technology.
COM Automation allows users to build scripts in their applications to perform repetitive tasks or control one application from another.
The family of COM technologies includes
– COM+
– Distributed COM (DCOM) and
– ActiveX® Controls.
Quality Center Open Test Architecture API -OTA COM 9.0
The Quality Center Open Test Architecture API is a COM library that enables you to integrate external applications with Quality Center. It is naturally and easily used with Microsoft Visual Basic, and the syntax and examples in this reference use Visual Basic. The examples in this project were developed with Microsoft Visual Basic 6.0 and are not necessarily valid under other development platforms.
The OTAClient.dll (OTA COM 9.0 Type Library) is downloaded to the following folder:
Quality Center Object Model
Component Object Model (COM) – Overview
Function to Connect to QC using the OTA API Methods
Private Function makeConnection(ByVal qcHostName$, qcDomain$, qcProject$, qcUser$, qcPassword$, Optional qcPort) As Boolean
'------------------------------------------------------------------------
' This routine makes the connection to the gobal TDConnection object,
' declared at the project level as Global tdc as TDConnection,
' and connects the user to the specified project.
'-----------------------------------------------------------------------
Dim qcServer As String
Const fName = "makeConnection" 'For error message
On Error GoTo makeConnectionErr
errmsg = ""
'Construct server argument of format "http://server:port/qcbin"
qcServer = "http://" & qcHostName
If Not (IsMissing(qcPort)) Then
If Len(qcPort) > 0 Then qcServer = qcServer & ":" & qcPort
End If
qcServer = qcServer & "/qcbin"
''Check status (For illustrative purposes.)
' 'MsgBox tdc.LoggedIn 'Error: OTA Server is not connected
' MsgBox tdc.Connected 'False
' MsgBox tdc.ServerName 'Blank string
'Create the connection
errmsg = "Failed to create TDConnection"
If (tdc Is Nothing) Then Set tdc = New TDConnection
If (tdc Is Nothing) Then GoTo makeConnectionErr
errmsg = ""
tdc.InitConnectionEx qcServer
''Check status.
' MsgBox tdc.LoggedIn 'False
' MsgBox tdc.Connected 'True
' MsgBox tdc.ServerName 'http://
'Log on to server
tdc.Login qcUser, qcPassword
''Check status.
' MsgBox tdc.LoggedIn 'True
' MsgBox tdc.ProjectName 'Empty String
' MsgBox tdc.ProjectConnected 'False
' Connect to the project and user
tdc.Connect qcDomain, qcProject
' MsgBox tdc.ProjectName 'qcProject
' MsgBox tdc.ProjectConnected 'True
' Exit status
makeConnection = SUCCESS
Exit Function
makeConnectionErr:
ErrHandler err, fName, err.Description & vbCrLf & errmsg
makeConnection = FAILURE
End Function
Using the Quality Center Open Test Architecture API methods and classes one can automate and customize the actions of Quality Center like Execute TestSets, Execute Tests, Get Execution Status, Get or Set Requirements, Get or Set Test Design Steps or Attachments and many more actions in Quality Center.
API References:
· Mercury Quality Center Open Test Architecture API Reference
· Mercury Quality Center Site Administration API Reference
Note: Right-Click on the File and Click "Unblock"
NOTE:
If you want to know what is the reference for the TDAPIOLE you have to go to the regedit, "HKEY_CLASSES_ROOT\TDApiOle.TDConnection\CurrVer" and see what is the current version and use it.
NOTE:
If you want to know what is the reference for the TDAPIOLE you have to go to the regedit, "HKEY_CLASSES_ROOT\TDApiOle.TDConnection\CurrVer" and see what is the current version and use it.