SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    run scripts on remote machines

    Hi,

    I am trying to run a QTP script on more than one machine simultanously. In other words I want to run a QTP script on 3 or 4 remote machines from my desktop. The remote machines have QTP installed.

    I used the following script to do this task, but it runs QTP on only one machine at a time. After finishing the run in 1st machine it starts running the script on the 2nd machine. But I want to run in all machines at the same time. How can I run this script simultanously on more than one machine? In my script I am reading the list of machineID's where I need to run the script.

    Script:

    Option explicit

    Dim objExcel, objWorkBook, objWorkSheet

    Dim MyDirectory,RowCounter,App,machineID

    SystemUtil.CloseProcessByName("EXCEL.EXE")

    MyDirectory = Environment.value("TestDir")

    Set objExcel = CreateObject("Excel.Application")

    objExcel.displayAlerts = False

    objExcel.visible = true

    Set objWorkBook = objExcel.WorkBooks.Open (MyDirectory&"\ControlMachines.xls")'its open WorkBook

    Set objWorkSheet= objWorkBook.WorkSheets("RemoteControl")

    For RowCounter=2 to objWorkSheet.Evaluate("COUNTA(A:A)")

    machineID = objWorkSheet.Cells(RowCounter,1)

    msgbox machineID

    Set App=CreateObject("QuickTest.Application", machineID &".gsn.corp.net")

    App.Launch

    App.Visible = True

    App.Open "\\gpnas02\Internet\Rama\SnapperVersion3.0"

    'App.Open "\\gpnas02\Internet\shyam's code\DBCheck_XMLutil_practice_022707"

    App.Test.Run

    'objWorkBook.saveas(MyDirectory&"\TestPlanWith Results.xls")

    'objWorkBook.saveas (Environment.value("TestDir") &"\TestPlanWithResults.xls")


    Next

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: run scripts on remote machines

    You are running the test snychronously. You need to go async in your case. Use this

    App.Test.Run , False 'WaitOnReturn = False

  3. #3
    Member
    Join Date
    Aug 2005
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: run scripts on remote machines


    Thanks Tarun!! That script works fine now. [img]/images/graemlins/smile.gif[/img]

    Now I lost control of the remote machines that is running scripts. How to stop the QTP scripts that is running on all the remote machines at once? Is there any command for this?

    Thanks,

    Ram-Nat

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: run scripts on remote machines

    No. But when you want to take control of the remote QTP again you can create the object for QTP again and it will connect to the current running instance of QTP.

    Set App=CreateObject("QuickTest.Application", machineID &".gsn.corp.net")

    App.Test.Stop

  5. #5
    Member
    Join Date
    Aug 2005
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: run scripts on remote machines

    Thanks a lot

  6. #6
    Member
    Join Date
    Aug 2005
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: run scripts on remote machines

    I was able to run a script which is on network path "\\gpnas02\Internet\QTP_loginScript" I can run this script on several remote machines using QTP Automation mode as shown below:

    App.Open "\\gpnas02\Internet\QTP_loginScript"

    But I have a QTP script in my machine. I am running this script on several remote machines but it is not accessing my local script in my machine.how to execute this task??

    is this right?

    App.Open "c:\QTP_loginScript"

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:00 AM.

Copyright BetaSoft Inc.