TESTEVERYTHING

Wednesday 13 April 2011

Connect QC through API using VB script

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 “

else

msgbox “not connect with Quality Center Check username /Password/Domain name /Project Name “

End If

Set objTDConnection = nothing

No comments:

Post a Comment

Which one is right ?

Translate







Tweet