SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2001
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    For SilkTest Gurus...

    I have these scripts running on IE that are running fine. However, as we all know once and a while 404 errors come up or other types of error screens happen. What I want to do is have the testcases run but while they are running I want the script to be able to handle those error screens. Specifically, if they come up I want to capture the screen caption (which I know how to do now) and write a specific thing to the log. How can I write this so that Silk will do this as the event happens? I'm probably not explaining it well.

    Basically I just want it to be a routine that executes ONLY in the event that an unexpected screen shows up.

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

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: For SilkTest Gurus...

    Use the do..except statement to handle these types of problems. See Help for more information.

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

  3. #3
    Member
    Join Date
    Feb 2001
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: For SilkTest Gurus...

    Okay - so I guess I put a do...except loop in each testcase. I can do that - I was just hoping there was some way to put the do..except logic in a separate file altogether that the testscript just reads. I was thinking of using TestCaseEnter but the problem is I need the do...except loop to always handle the exceptions - not just when the testcase is entered.

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

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: For SilkTest Gurus...

    How 'bout this. Instead of having Browser.LoadPage in your testcases you write your own common function that does the Browser.LoadPage then handles the 404 error (and you'll soon find others to add to the list) the way you want it to be handled.

    Your function would have to have the same parameters as Browser.LoadPage and pass those values along to Browser.LoadPage. You could have an additional parameter to your function that tells the function how severe or not to consider the problem to be. And your function could also return a BOOLEAN that indicates if your testcase should continue or not. So once the function is written and tested you would have to update all existing testcases to use your function instead of Browser.LoadPage directly.

    If that doesn't work then you're probably where I found myself about a year ago. I had to actually implement my own changes to the browser.inc, explorer.inc, etc files that Segue delivers with SilkTest. These files "live" in the SilkTest install folder, "extend" subfolder and you cannot move them to somewhere else. The biggest problem with updating these files is ensuring that the latest versions always get deployed to all machines that have SilkTest installed on them. The second biggest issue is retaining your updates with a new version of SilkTest. If you need to go down this route then you might want to refer to my QUEST presentation "SilkTest Configuration Made Easier" when the files get posted on www.segue.com (within a week or so). I don't address these files specifically (ran out of time) but the basic concept is in there.

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

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

    Re: For SilkTest Gurus...

    You can also handle this by defining a TestCaseExit (BOOLEAN bExcept) function in your test frame. This will override DefaultTestCaseExit (). In this function, you can check for the 404, capture the screen, etc., then call DefaultTestCaseExit (bExcept), so the normal recovery system runs after that and reports any errors.

    do...except in each testcase might not be required.

    Hope this helps


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

 

 

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 02:30 AM.

Copyright BetaSoft Inc.