Connection to Quality Center - vbscript/QTP
Using OTA Framework , we can connect to Quality Center in two ways .
1. Utilising TDApiOle80 library - using vb script alone
2. Connect to quality center from QTP.
Function Connect_QC()
dim username
dim pwd
TDConnection.InitConnectionEx("http://qualitycenter.8080/qcbin")
TDConnection.LoginEx username,pwd
TDConnection.Connect "Domain","Project"
' MsgBox "connected"
If TDConnection.LoggedIN = "True" Then
msgbox "logged into QC successfully"
Else
msgbox "Please enter valid credentials"
End If
End Function
=======================================================================
Function Connect_QC()
Set GLOBAL_QC_CONNECTION=Nothing
Set GLOBAL_QC_CONNECTION = QCUtil.QCConnection
if QCUtil.IsConnected then
Set GLOBAL_QC_TESTSET_TREEMANAGER= GLOBAL_QC_CONNECTION.TestSetTreeManager
msgbox "connected"
Connect_QC= "True"
else
Connect_QC= "False"
msgbox "error"
end if
End Function
Comments
Post a Comment