Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up the Scheduler
#3
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

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
Reply


Messages In This Thread
Setting up the Scheduler - by mv8167 - 03-15-2012, 02:47 AM
RE: Setting up the Scheduler - by swathi - 03-19-2012, 10:12 PM
RE: Setting up the Scheduler - by mv8167 - 03-22-2012, 01:50 AM
RE: Setting up the Scheduler - by swathi - 03-22-2012, 03:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting value in a WinObject Ansh123 0 4,895 03-20-2014, 09:44 PM
Last Post: Ansh123
  Setting values in Tabstrip TonyBarker 0 2,324 01-25-2013, 03:32 PM
Last Post: TonyBarker
  Setting the value based on link existence joncfrazier 0 2,695 05-15-2012, 03:53 AM
Last Post: joncfrazier
Exclamation how to set-up automatic scheduler dol_fin 1 2,905 03-14-2012, 10:32 AM
Last Post: sshukla12
Shy Setting a html path to a variable mv8167 2 4,101 09-29-2011, 10:42 PM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 1 Guest(s)