Saturday, June 30, 2012

Connect QC through API

Here is the script to connect to QC through API.

DomainName =”TEST”
ProjectName =”Automation”
UserName =”Ramesh”
Password =”Password″
ServerName =”Server:8080″
Set objTDConnection = CreateObject(“TDApiOle80.TDConnection.1″)

QCServerName =”http://”& ServerName &”/qcbin”
objTDConnection.InitConnectionEx QCServerName
objTDConnection.ConnectProjectEx DomainName, ProjectName, UserName, Password
If objTDConnection.loggedin Then
    msgbox “Connect successfully “
else
    msgbox “not connect with Quality Center Check username /Password/Domain name /Project Name “
End If

Set objTDConnection = nothing

No comments:

Post a Comment