SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    Houston, TX, USA
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    KillTest command?

    User (joseph_george@bmc.com) posted:

    Hi,

    Is there a command I can use to abort/exit a test from within
    code? For example

    if (condition == TRUE)
    KILL
    else
    CONTINUE

    There may be an obvious answer, but I am new to Silk. Any help is
    appreciated.

    JBG
    "SILK is KLIS backwards."


    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    exit

    will do what you want

    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    Chandigarh, India
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    User A. Pandiyan (apandiyan@quark.stpm.soft.net) posted:

    You can use
    "Exit" - to for exit from Silk process
    "Break" - to come out of the current loop
    To Continue,
    its
    "Continue"
    only



  4. #4
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    But 'Exit' kick you out from the whole script you are in . Is there any way to get out from the testcase when you are not in a loop or condition?

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

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    try 'return'

    Def from help:
    Returns control from a function to its calling function or from a child thread to its parent thread.

    Let us know if it works.

    Also you can attempt a 'goto';lol

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

  6. #6
    Junior Member
    Join Date
    Oct 1999
    Location
    Germany
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?


    if you really want to stop your tests (which means all tests including the testplan or other testcases) you can use the StopRunning by entering

    if condition
    @("$StopRunning")()
    else
    ...

    but be aware of the using of that function - the big difference to all 'exit','return' etc things is that the rescue system is also kicked off. No 'SetBaseState' or however will run in this case. You have NO chance (not even by using do/except) to catch this line.
    Alternativly try out this:

    if condition
    raise 1,"this is my very special error text"
    else
    ...

    its more clean, and it will only stop the running testcase (or it will go to the next except if you are in a 'do-except' loop).


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

  7. #7
    Junior Member
    Join Date
    Jun 2002
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    The @("$StopRunning")()

    function works fine (it stops execution), however I get an error (No default browser set) caused by the recovery system (DefaultBaseState) the next time I try to run my script. In order to run my script I have to close SilkTest and my AUT.

    Maybe this is why they don't support this function =)

    I am testing a win32 VB app

  8. #8
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: KillTest command?

    if you want to stop completely just the current function or testcase another suggestion would be to use the 'goto' statement and assign a flag at the end of the fuction which does nothing after that but exits as normal.

    [apologizes if idea already suggested]

    ------------------
    -gram

    [This message has been edited by gram (edited 10-30-2002).]
    -gram

 

 

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 07:29 PM.

Copyright BetaSoft Inc.