Hi Swathi,
Sorry for the delaid responce.
Well, I have been trying to use MS Schedular with the command line, but no luck. I get QTP to start, but the setytinghs dont get set. I think I am to use QC with this code.
"C:\Program Files\HP\QuickTest Professional\bin\QTPro.exe" /s:http:\qc-alm.wellsfargo.com\qcbin /n:WACHOVIA_SECURITIES /d:BSG /u:a641422 /p:$Mike201 /f:"O:\QTP Tests\NightlyRegressionTesting\Tests" /t:"Image Access - Regression Testing by ENV" /l
Well, I ended up skipping the above and I am going to try just using a vbs file.
Here is what I did and it works. You will need to and a new event to the MA Schedular and point tou your vbs file below. Also, point thev Start In to whe folder that holds your test script.
Vbs file:
'The below lines of code (vbs file) is to open and run a test script using Windows Scheduler
Sorry for the delaid responce.
Well, I have been trying to use MS Schedular with the command line, but no luck. I get QTP to start, but the setytinghs dont get set. I think I am to use QC with this code.
"C:\Program Files\HP\QuickTest Professional\bin\QTPro.exe" /s:http:\qc-alm.wellsfargo.com\qcbin /n:WACHOVIA_SECURITIES /d:BSG /u:a641422 /p:$Mike201 /f:"O:\QTP Tests\NightlyRegressionTesting\Tests" /t:"Image Access - Regression Testing by ENV" /l
Well, I ended up skipping the above and I am going to try just using a vbs file.
Here is what I did and it works. You will need to and a new event to the MA Schedular and point tou your vbs file below. Also, point thev Start In to whe folder that holds your test script.
Vbs file:
'The below lines of code (vbs file) is to open and run a test script using Windows Scheduler
Code:
Dim Test_path
'Set Test Path
Test_path = "O:\QTP Tests\NightlyRegressionTesting\Tests\Image Access - Regression Testing by ENV"
'or "C:\Documents and Settings\a641422\Desktop\Automation\Streamline_Regression_Suites"
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Set qtResults = CreateObject("QuickTest.RunResultsOptions")
qtResults.ResultsLocation = "O:\QTP Tests\NightlyRegressionTesting\Results" ' Set the results location
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
qtApp.WindowState = "Maximized" ' Maximize the QuickTest window
qtApp.ActivateView "ExpertView" ' Display the Expert View
'Set QuickTest run options
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
qtApp.Open Test_path, True ' Open the test in read-only mode
'Set run settings for the test
Set qtTest = qtApp.Test
qtTest.Run ' Run the test
qtTest.Close ' Close the test
qtApp.quit
set qtResults = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object