可以使用TDConnection Object来进行连接,实例代码如下:
‘ Create the QuickTest Professional application object.
Set qtqcApp = CreateObject(”QuickTest.Application”)
qtqcApp.Launch ‘Launch QTP
qtqcApp.Visible = True ‘Make it visible
‘Connect to Quality Center
‘qtqcApp.TDConnection.Connect <QC Server path>, <Domain name that contains QC project>,
‘<Project Name in QC you want to connect to>, <UserName>, <Password>,
‘ <Whether ‘password is entered in encrypted or normal. Value is True for encrypted and FALSE for normal>
qtqcApp.TDConnection.Connect “http://QualityCenterServer/tdbin”,
“FR”, “Flights”, “learnqtp”, “welcome”, False