Our Client is US based.They will be running tests on our QA environment at 9.00pm (our time)everyday.So we thought of scheduling a testrun before they start testing.
I'd like to know if we can run the QTP tests unattended by scheduling it to run at a particular time without the help of Test Director or QC.
Yes you can. You can use a VBScript file that can run QTP and then use Windows Scheduler to schedule running that VBScript. You need to learn about QTP Automation. Look in the QTP Automation reference file. Search the forum for QuickTest.Application.
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Open "C:\ Your Test Path Here", True ' Open the test in read-only mode
' set run settings for the test
Set qtTest = qtApp.Test
qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error occurs
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
qtResultsOpt.ResultsLocation = "C:\Your Results Path Here" ' Set the results location
qtTest.Run ' Run the test
'qtTest.Close ' Close the test
Set qtResultsOpt = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object
Going back in the history. I tried the script that is posted by COSED.
Script runs fine, launches QTP and executes the test script specified. the problem is I don't see any result under the result path that i specified. Any ideas anyone(COSED)????
Is there a command that I need to add to move the result file to the result path/folder?