Connect QC through API using VB script

Posted by rajivkumarnandvani on December 20, 2010

Hi All,
Here I am mentioning the script that will connect to Quality Center. For this,your system must have QC api dll/QC client installed.

REM Define the Domain name
DomainName =”DEFAULT”

REM ‘Define the ProjectName
ProjectName =”Automation”
REM ‘ login username
UserName =”Rajeev Nandwani”
REM ‘ login password
Password =”RNSystem00″
REM ‘ Server name with Port
ServerName =”QAserver:8080″

Rem Create QC Connection Object
Set objTDConnection = CreateObject(“TDApiOle80.TDConnection.1”)
Rem Connect with server
QCServerName =”http://”& ServerName &”/qcbin”
objTDConnection.InitConnectionEx QCServerName
Rem Connect with Project
objTDConnection.ConnectProjectEx DomainName, ProjectName, UserName, Password

Rem Check login Success or not

If objTDConnection.loggedin Then

msgbox “Connect successfully ”
msgbox “not connect with Quality Center Check username /Password/Domain name /Project Name ”
End If

Set objTDConnection = nothing


3 Responses to “Connect QC through API using VB script”

  1. shaik said

    its useful for who is trying on qtp jobs

  2. Anonymous said

    It was really really useful and very much instructive 🙂 Thank you very much and Cheers 🙂

  3. Sarath M said

    Useful first step. 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: