Set App = CreateObject(“QuickTest.Application”) ‘ Create the Application object
App.SetActiveAddins Array(“Web”, “Java”, “Oracle”) ‘Set the required Add-Ins
App.Launch ‘ Start QuickTest
App.Visible = True ‘ Make the QuickTest application visible
App.New ‘ Open a new test
‘App.Open “D:John” ‘- use this if you want to open existing test
If Not App.TDConnection.IsConnected Then
App.TDConnection.Connect “http://<server url>”,”<domain name>”,”<project name>”,”<user name>”,”<password>”,False ‘ remove <> brackets
End If
App.Options.Run.ViewResults = False
App.Test.Actions(“Action1”).ObjectRepositories.Add “[QualityCenter] SubjectjohnRepositoryRep.tsr”
App.Test.Settings.Resources.Libraries.Add “[QualityCenter] SubjectjohnRepositoryLib.vbs”
‘App.Test.Actions(“Action1”).SetScript “‘TestCaseId: “&vbCrlf&”‘TestCaseName: “&vbCrlf&”‘Description: “&vbCrlf&”‘Created By: John”&vbCrlf&vbCrlf&vbCrlf&”‘*******************************Prerequisites********************************”&vbCrlf &”‘Application should be open and login”&vbCrlf &”‘*******************************************************************************”
Set App = Nothing ‘ Release the Application object
In case of any queries, please leave your comments.
nice post!!