-
Expert Member
Unable to start the specific test.
I am trying to run the QTP from commandline. I managed to execute QTP through commandline but I got as far as opening the QTP application and unable to start the specific test. I found in one of the posts that I need to create the VBS file which I can execute through the batch file. I need to execute specific test. I am not sure what exactly needs to be included in the VBS file since each test folder contains lots of different files.
Can anyone help me found solution or post some working sample code?
NOTE : [This question was asked by schittoor]
-
Junior Member
Re: Unable to start the specific test.
Hi,
The solution is there in the QTP help file itself. You can get a sample script is there to access QTP and run the specific script.
Search for string "CreateObject" and see the example.
Also i am attaching the script..
' create the QTP application object
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Test.Settings.Launchers("Web").Active = False
qtApp.Test.Settings.Launchers("Web").Browser = "IE"
qtApp.Test.Settings.Launchers("Web").CloseOnExit = True
qtApp.Test.Settings.Launchers("Windows Applications").Active = True
qtApp.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll
qtApp.Test.Settings.Run.IterationMode = "rngAll"
qtApp.Test.Settings.Run.StartIteration = 1
qtApp.Test.Settings.Run.EndIteration = 1
qtApp.Test.Settings.Run.ObjectSyncTimeOut = 20000
qtApp.Test.Settings.Run.DisableSmartIdentification = False
qtApp.Test.Settings.Run.OnError = "Dialog"
Like this..you can create a vbs file and run it.
Thanks, Jitu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules