SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Base State & Recovery Mechanism in SilkTest

    I've been working with an eval copy of Silk and have faced a couple of problems so far. They are as follows:

    1) Base state:
    How does Silk decide on a base state? Does it take the wMainWindow and sCmdLine variables into account and invoke the applications main window at the beginning of a testcase?
    e.g. I tried out with the notepad application. Silk, sometimes, invoked the notepad application at the beginning of the testcase, and sometimes it didn't.

    So, what's wrong here? I'm using silkTest 5.5.3

    2) Recovery Mechanism:
    The much bragged about Recovery mechanism isn't obviously working so well. In the notepad application, when I tried to save and overwrite an existing text file, a message box came up asking me if I wished to replace the existing file. I hadn't expected this window and so hadn't accounted for it in the script. But shouldn't Silk have closed the message box, and returned the application to its base state?
    Well, it didn't and the subsequent testcases also failed because it couldn't see the main window???

    I would like to add here that the crossbox on the message box was disabled.

    Does anyone have any idea as to what could be wrong here?

    ------------------
    pbm
    pbm

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Base State & Recovery Mechanism in SilkTest

    Maybe you code post your frame file? It sounds like the tag of the application isn't right. Are you working with the Segue TextEditor sample app or the real Notepad that comes with Windows?

    ------------------
    Tom
    Tom

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

    Re: Base State & Recovery Mechanism in SilkTest

    I am working with the Windows notepad application.
    I've enclosed the framework file for your reference.

    ------------------
    pbm
    pbm

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

    Re: Base State & Recovery Mechanism in SilkTest

    1)you should over write the default base state function, so you have all the control.

    2)In your notepad case it's impossible to close the notepad with that dialogbox open.
    Maybe you could if you crash the app from the taskmanager which is not Silk's responsability. You can't ask Silk to do something that you can't even do it manually.
    It's GUI testing tool not VC++.

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

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

    Re: Base State & Recovery Mechanism in SilkTest

    I would go with a simpler tag, like this

    ...my guess is that the multitag is confusing SilkTest.

    ------------------
    Tom
    Tom

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

    Re: Base State & Recovery Mechanism in SilkTest

    We have the same problem here: we want to test our application, but sometimes there's an error message dialog when we want to exit the application, eg. XXXX not saved, or when it crashes we get some sybase CTlib error messages sometimes even 5 in a row before the application closes. How can we handle this in silk reliably?

    Greets Chris

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

  7. #7
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Base State & Recovery Mechanism in SilkTest

    Hi pbmtester,

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by GodKnows:
    1)you should over write the default base state function, so you have all the control.


    <HR></BLOCKQUOTE>

    I second this, the built-in routine DefaultBaseState is itself an application state, it is written to take care of the application state with generic scenarios. Taking your own case for e.g. one user may want to overwrite the file while other may not. Silk cannot make that descision.
    Herein you could do two things,
    1) Overwrite the DefaultBaseState to take care of the scenario as YOU want.
    2) Overwrite the DefaultTestCaseExit. Here you could use a "do except" loop to take care of the exception if one is raised.

    ------------------
    never say die

    [This message has been edited by witchcrop (edited 06-23-2002).]
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

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

    Re: Base State & Recovery Mechanism in SilkTest

    Chris,

    Write a TestCaseExit() routine. In it write a while loop that watches for, documents and closes the CTLib error messages.


    John


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

  9. #9
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Base State & Recovery Mechanism in SilkTest

    Apart from hard-coding (in TestCaseExit, DefaultBaseState or elsewhere) the way to close the application when there are unexpected dialogboxes, there are some automatic ways of doing it:
    - Use the settings defined on the 'Close' page of the Agent Options window. Here you can define for example which buttons silk should try and push on a dialogbox which it wants to close
    - Record a window declaration for the dialogbox in question, and define your own Close() method (which can be as simple as calling this.OK.Click()).
    This second strategy requires a lot more effort, as you will need to find and comment out your messagebox window declaration (automatically inserted by silktest) and record window declarations for all the dialogboxes you might ever encounter. But, I find that the freedom to recognise, react to, and dispose of individual dialogboxes useful enough to put up with this. This has been discussed before, at http://www.qaforums.com/Forum1/HTML/001966.html amongst other places.

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

 

 

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 10:54 PM.

Copyright BetaSoft Inc.