SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Howto close (kill) the application under test when it\'s not responding?

    Hello all,

    how can I programmatically kill (close) the application that crashed and is not responding, before running the next testcase on the application?

    Why I tried the methode close() to close all the windows belonging to the application under test and then try to closre the application itself by calling a function that closes the application under test, I get the error application not rexponding, and nothing happends. Is there a way to get around this?

    Thanks for your suggestions and help.

    ------------------
    Silverter - A profi was once a beginner
    Silverter - A guru was once a beginner

  2. #2
    Junior Member
    Join Date
    May 2001
    Location
    New Delhi , India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    hi,

    Some methods which I have been using in such scenarios are as follows :

    1. Exit () method , this works for some cases , but not all methods.

    2. If possible for typing any keys using TypeKeys () method , try simulating the key-strokes , which would quit [ kill ] the application being tested i.e. you can try CTrl-Q or Alt-F4 for killing the app.

    3.Open Task Manager [ Win NT / 2K ] and try ending the process which is not responding. This method should work for most of the cases when the hung application is not responding at all.

    Hope this information helps!!!

    Cheers,

    Grover.

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

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    Most reliable way to do this is via the Windows API functions - check out the 'KillProcess' code posted in the following thread:
    http://www.qaforums.com/Forum4/HTML/000563.html

    This snippet is in WinRunner TSL, but it should be reasonably easy to 'translate' it to 4Test and will give you an idea of which API calls to use.

    Let me know if you need any further info on what's happening in this function.

    Automatrix

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

  4. #4
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    Thanks alot for your replies:

    VishalGrover:

    1) I can't use the exit () method because the application is not responding, thus calling mainwin.exit () throws ans exception.

    2) I'm about to investigate the solution with Typekeys. Just a Question, how shall I send the TypeKeys to the specific application, I can't set any focus on it because it's crashed and Silk can't see it anymore !? and if I just do a Desktop.TypeKeys (), it might close the wrong application, or Silk's window, that is currently the active window !?! Am I missing something? Please correct me...

    3) About opening the taskmanager and killing the process of the application that crashed, I need to write a new routine for this an will investigate that as soon as possible. I'll come back to you as soon as I have something new.

    Automatrix:

    Thanks for your help. I read the page on the Link you sent, and I had problems understanding the code snipsset of Killprocess ()(sorry, I'm new to Silk) and could find a way to translate it into Silk 4Test code. Can you please point to me where to get more info on how to translate this code or where I can read about WinRunner code?

    best regards

    ------------------
    Silverter - A profi was once a beginner
    Silverter - A guru was once a beginner

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Posts
    221
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    OK, if you're fairly new to SilkTest this will probably be too tricky for you right now as you need to understand how to call external DLLs etc.

    It may be more straightforward to use one of the other methods mentioned here as you could get knotted up messing around in advanced SilkTest and WinRunner for hours (or worse ) which would get you no closer to getting the job done.

    There is no automatic translation between SilkTest and WinRunner code, I'm afraid - you have to have (at least some) knowledge of both languages to rewrite one to the other.

    Sorry, I couldn't help more...

    Automatrix




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

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    If you wanna go the task manager route, I've had some mild successes in this arena.

    Here are some declarations for it if you want to use them...

    Might save you 10-15 minutes.

  7. #7
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    If you want, check out QAForums Segue download page:

    http://www.qadownloads.com/Segue/more3.html


    This file contains NT Task Manager window declaration and many methods such as ProcessKill () and newly added GetApplications () There are also many supporting functions included.

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

  8. #8
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Howto close (kill) the application under test when it\'s not responding?

    Thanks alot for your replies. The Taskmanager solution did the trick for me, it works perfect. Happing testing...

    best regards

    ------------------
    Silverter - A profi was once a beginner
    Silverter - A guru was once a beginner

 

 

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 12:50 PM.

Copyright BetaSoft Inc.