Micro Focus QTP (UFT) Forums
Setting up the Scheduler - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Setting up the Scheduler (/Thread-Setting-up-the-Scheduler)



Setting up the Scheduler - mv8167 - 03-15-2012

I am having issues running the scheduler. I have read your documentation but perhaps my setup is incorrect? Can you plz look over my coding to Schedule my RuntTestSet.exe I guess that I am confused on how to set up Run and Start in:

My folders are set up as:
I am having issues running the scheduler. I have read your documentation but perhaps my setup is incorrect? Can you plz look over my coding to Schedule my RuntTestSet.exe I guess that I am confused on how to set up Run and Start in:

My folders are set up as:
O:\QTP Tests\NightlyRegressionTesting\Release (where RunTestSet.exe lives)
O:\QTP Tests\NightlyRegressionTesting\RunFolder (where output files go)

Run is:
O:\QTP Tests\NightlyRegressionTesting\Release\RunTestSet.exe \s:http:\qc-alm.wellsfargo.com\qcbin \n:WACHOVIA_SECURITIES \d:BSG \u:a641422 \p:$xxxx201 \f:"O:\QTP Tests" \t: "1 - Image Access by ENV-5" /l

Start In is:
"O:\QTP Tests\NightlyRegressionTesting\RunFolder"
The test "1 - Image Access by ENV-5" I want to run is in: "O:\QTP Tests"

The test "1 - Image Access by ENV-5" I want to run is in: "O:\QTP Tests"

Any ideas of what I am doing incorrectly?

(see my attachment for images)



RE: Setting up the Scheduler - swathi - 03-19-2012

have you solved the issue? if yes please let me know how you did that


RE: Setting up the Scheduler - mv8167 - 03-22-2012

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



RE: Setting up the Scheduler - swathi - 03-22-2012

Lorena,

Thanks for replying