QTP QC Connection

Those automation engineers who generally work with QC/TD and QTP.They need to check for active QTP-QC connection.
Here is a simple code to determine if the connection is active or not or to connect the QTP and QC

Set qtApp = CreateObject("QuickTest.Application")
If qtApp.TDConnection.IsConnected Then
msgbox "QC"
msgbox "Local"
End If


if QCUtil.IsConnected then
Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.QCConnection.ServerName + chr (13) +"Project: " +
QCUtil.QCConnection.ProjectName + chr (13) + "Domain: " + QCUtil.QCConnection.DomainName
Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center"
end if
QTP QC Connection QTP QC Connection Reviewed by Animesh Chatterjee on January 20, 2009 Rating: 5

No comments:

Powered by Blogger.