SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jul 1999
    Location
    Ottawa
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trapping User abort?

    I have a quick question... I notice that the predefined exception values include an E_ABORT exception, to indicate that a script was aborted by the user. Can 4Test code trap this exception? In other words, could I create a script that would run until the user presses Shift+Shift, then perform custom exception handling?

  2. #2
    Junior Member
    Join Date
    May 2001
    Location
    Sophia-Antipolis, France
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    Hi,

    I've exactly the same need as you.
    Did you find a way to process your custom handling.

    Rgds.

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

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

    Re: Trapping User abort?

    Look into threads.

    In theory:
    You could do this if you have a separate thread running the code to catch the key stroke, and the other thread running the test script.

    I never used multi-thread functionality in my script so I have no example.

    ------------------
    After closer look at the help it seems that silk's multi-thread only works if the thread is running against unique client(s). If someone know better let us know.


    [This message has been edited by GodKnows (edited 05-13-2002).]

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    It won't work using a do...except block because Silk reports the 'user abort' at the line it was executing when the shift-shift was keyed. It can't get to the except routine.

    Just curious. What were you planning to do with it if it worked? There may be another way to get there.

    John


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

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    Never tried this, but what about putting a check in TestCaseExit that checks to see if ExceptNum () == E_ABORT and then doing something there.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    Someday I'll learn how to do those nifty HTML -formatted pastes...

    > ...what about putting a check > >inTestCaseExit that checks to see if
    >ExceptNum () == E_ABORT

    That's what I tried. Silk tosses you out before testcaseexit().

    Since Silk 5.0.3.1, (currently 5.5 SP1) I've had considerable difficulty getting Silk to actually respond to a shift-shift terminate. My code is getting tight enough that shift-shift doesn't work at all except in the simplest cases.

    To stop Silk, I have to terminate the topmost app' or the Agent before I can regain control.

    John


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

  7. #7
    Junior Member
    Join Date
    May 2001
    Location
    Sophia-Antipolis, France
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    Quite impressed by your quick responses guys!

    I've already try to modify the TestCaseExit() in default.inc, just by printing something if Silk enter this function. And I can tell you, that Silk never enter in that function when you press Shift+Shift, as it will not enter any of the others functions defined into default.inc

    I also notice than Silk's multi thread is done to run thread on different machines, but it is not clearly said that 2 threads on the same machine will not work. Anybody has an experience on this?

    The reason why we need to execute somethink when the script is interrupted by Shift+Shift, is because we have to change the PC date during the test execution. That need to stop the w32time service, and we have to insure that after the script have finished to run, even if it has been interrupted by Shift+Shift, the service is started and the date well synchronized with the domain server date. Otherwise, under windows 2000, you will experience quiclkly some major problems when using your PC for somethink else.

    Olivier.

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

  8. #8
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trapping User abort?

    People HAVE CLAIMED TO RUN SILK MULTI THREADS, but I can never get them to print an example of doing so on the same machine.

    See this thread where I propose a simple question to answer. http://www.qaforums.com/Forum1/HTML/002528.html


    For those claiming they can multi-thread on ONE machine, please tell me HOW because I have yet to discover it.

    Anthony

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

 

 

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 03:48 PM.

Copyright BetaSoft Inc.