SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Testing while rebooting

    So I think I can test and reboot using the Mercury CSO2 library. But what do you do when you're launching the tests from TestDirector from a remote controller?

    Does anybody have a good library to upload that includes how to reboot while testing?

    Thanks,
    AJ Alhait
    BetaSoft Inc.

  2. #2
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Testing while rebooting

    AJ, I think the "kernel32.dll" contains the function to do that. It will probably take a COM object to reboot/restart remotely.

    http://www.andreavb.com/API_KERNEL32.html

    maybe some help here:
    http://www.google.com/search?q=com+o...&start=20&sa=N

  3. #3
    SQA Knight
    Join Date
    Jun 2002
    Location
    Cupertino, CA, USA
    Posts
    2,164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Testing while rebooting

    I once implemented this by writing a dos command line to launch WinRunner in the registry. The place to write this is here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\RunOnce

    Whatever command is written here will be executed upon startup. The command will then be erased, so it won't be executed the next time you start up. You can write to the registry by using the cso2 function create_reg_value.

  4. #4
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Testing while rebooting

    Not claiming it's the best or most elegant way, but what I do is:

    1. Test PC is configured to boot as admin user without requiring a password. (If this is a security risk for you, then just ignore this whole message.) If running other than XP, make sure you have a copy of shutdown.exe in your path (you can just copy it from any XP box).

    2. WR Script 1 does what it needs to do prior to the reboot condition, then uses file_*() functions to create a .bat file which will start WR with Script 2, and save that .bat file in the user's Startup directory.

    3. Last command in WR Script 1 is:</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">dos_system(&quot;call shutdown.exe -r -f -c \&quot;WinRunner rebooting this PC\&quot; -t 10&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">4. Upon rebooting, batch file launches WR running script 2, which should include code to remove the batch file which script 1 created from the startup directory.
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.&lt;/i] (The Song of Roland)

 

 

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 11.54%
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 06:33 AM.

Copyright BetaSoft Inc.