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"
        EndIf

  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

Popular posts from this blog

Cypress Cheat Sheet

Selenium WebDriver-Working with Listbox and Multi-Select Listbox

Selenium WebDriver -Handling JavaScript alerts