SPONSORS:






User Tag List

Results 1 to 8 of 8

Thread: Aborting script

  1. #1
    Guest

    Aborting script

    Just a quick question (I hope). I am looking to abort the script if one particular action does not occur correctly, and I can't see a command that seems to fit my purpose. The only command I can find is the Exit command which exits out of the script, but this apparently doesn't work with a suite of scripts (which is what we have). I therefore need to know if there is a way of aborting the suite altogether, gracefully if possible, so as I can look to address the problem.

    ------------------

  2. #2
    Junior Member
    Join Date
    Apr 2001
    Location
    Birmingham
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    Don't EXCEPT you DO statement and SIlkTest automatically quits gracefully.

    ------------------

  3. #3
    Junior Member
    Join Date
    Apr 2001
    Location
    Birmingham
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    Confirmed m8. Just issue a logerror outside of a DO EXCEPT loop and SilkTest quits.

    Hope this helps m8.

    laters

    ------------------

  4. #4
    Junior Member
    Join Date
    Apr 2001
    Location
    Birmingham
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    Having looked through the help I noticed a function called $StopRunning

    Note This feature is provided as a convenience to you, but it has not yet been thoroughly tested.

    Action

    Halts whatever you are running, bypassing the recovery system, the resetting of recorder options in the Agent, and any exception handlers you’ve specified.

    Syntax

    StopRunning ( )

    Notes

    $StopRunning must be called with the reference operator as @(“$StopRunning”) ( ).

    Example

    integer i
    i = SYS_GetFreeMemory()
    [ ]
    // If available memory falls below 10% then debugging
    // is not possible -- so stop everything.
    if i < 10
    @("$StopRunning")()

    Hope this helps

    Laters

    ------------------

  5. #5
    Guest

    Re: Aborting script

    Cheers Autom8tor.

    I have just seen the StopRunning function, and this actually does the job a bit better than the LogError method.


    ------------------

  6. #6
    Junior Member
    Join Date
    Apr 2001
    Location
    Birmingham
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    I know that is why I posted the last message.


    Laters

    (3 LKLTM)




    ------------------

  7. #7
    Junior Member
    Join Date
    Oct 2000
    Location
    Chicago, IL, US
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    I find myself in the same situation. I have a Verify ("text", "yes") and would like to completely quit the script (and all subsequent test cases) if that verify fails.

    I have tried using this $StopRunning command with a java application (no browser). And if it executes during the script, it seems to set Silk in a state that it's looking for a browser (not using one) and it doesn't run anything after that. I have to shut it down and start Silk again to 'reset' it.

    Any other suggestions?

    ------------------

  8. #8
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Aborting script

    See if this helps:
    http://www.qaforums.com/Forum1/HTML/001902.html

    Was your use of the word "suite" intentional? Are you actually running from test suites (.s files)? Any reason for not switching over to test plans (.pln files)?


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 02:07 PM.

Copyright BetaSoft Inc.