SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Oct 2006
    Location
    Campinas/SP - Brazil
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Agent stops recognizing app

    Olá

    For the same Java app (as always =D), I have a testcase written and blablabla. This testcase receives an Integer parameter.

    On SilkCentral, I created 150 "Test Cases" on the Test Plan, each one linked with my script (with the same testcase) and passing a different number, from 1 to 150. Then, I created an Execution with all these Test Cases and ran it.

    If one of the Test Cases fails (for any reason), it reports to SilkCentral as "Failed", and the execution of the next Test Case starts, like expected.

    But I have a problem with one Test Case (number 92). When it executes, the application becomes very slow, and the Test Case fails ("Application Not Responding"). So, SilkTest should start the next Test Case (number 93). The problem is: the Agent still thinks that the app is not respondig.

    I tried to run both tests manually, and waited a long time between them (the necessary time for the app to become ready again), but the Agent stops regonizing the app (it doesn't find any controls anymore). If I restart the Agent, then everything is OK again.

    I think the easiest way to solve this is restarting the Agent before each execution... is there a way to do this (from the script)?


    Thanks in advance [img]/images/graemlins/wink.gif[/img]

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Agent stops recognizing app

    Well, Agent restart may help in this situation but this is not unstable solution. So it is highly desirable if you find some other solution of this problem.

    As for Agent restart:
    You may use pslist.exe to list all avaliable processes. There is pskill.exe utility which allows to kill some process. These two utilities are free and you may find them in the Internet. Agent is started from command line as many other applications.

    So, the scenario for Agent restart is:
    1) Use pslist.exe to list all processes. SYS_Execute function allows to retreive the output of the command line execution. There you can retreive a list of all avaliable processes
    2) Retreive the ID of agent.exe process
    3) Use pskill.exe to kill agent.exe process
    4) Use SYS_Execute to start Agent

  3. #3
    Member
    Join Date
    May 2005
    Location
    Ukraine
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Agent stops recognizing app

    If you use Window XP, it has command 'tasklist' and 'taskkill'. Here example, how to restart agent.

    <font class="small">Code:</font><hr /><pre>
    [ ] Disconnect(hHost)
    [ ] SYS_ExecuteLocal("taskkill /IM agent.exe")
    [ ] Connect()
    </pre><hr />

  4. #4
    Junior Member
    Join Date
    Oct 2006
    Location
    Campinas/SP - Brazil
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Agent stops recognizing app

    Thanks for all the help, it almost worked :P

    I tried:
    [ ] Disconnect(GetMachine())
    [ ] SYS_Execute("taskkill /IM agent.exe")
    [ ] SYS_Execute("agent")
    [ ] Connect("mymachine:2965")

    But SilkTest stops responding when executing the Connect command (!)
    And I'll have to execute the testcase from SilkCentral, wich is located on another machine, while the agent is running on my machine. So, I can't start the Agent on my machine remotely (I think)

    Right now I just realized that if I restart my app, the Agent starts "talking" with it normally again. So I'll try to restart the app during testcase execution, seems to be easier [img]/images/graemlins/wink.gif[/img]

  5. #5
    Junior Member
    Join Date
    Oct 2006
    Location
    Campinas/SP - Brazil
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Agent stops recognizing app

    Restarting the app worked well =)


    [-] if (MyApp.JavaxSwingJSplitPane.Exists() == FALSE) //If the Agent doesn't see this Control, then it has lost contact with the AUT
    [ ] LogWarning("RESTARTING APP")
    [ ] lsOptions = Agent.GetOption(OPT_CLOSE_CONFIRM_BUTTONS)
    [ ] Agent.SetOption (OPT_CLOSE_CONFIRM_BUTTONS, {"YES"})
    [ ] MyApp.Exit()
    [ ] Agent.SetOption (OPT_CLOSE_CONFIRM_BUTTONS, lsOptions)
    [ ] DefaultBaseState()

    PS: there is a Confirmation Dialog before closing the app

 

 

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 10.71%
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 01:48 PM.

Copyright BetaSoft Inc.