SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Location
    lombard, IL, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need to capture the error messages and direct them to result file

    My web application uses frames, and sometimes when the test is running, either browser or my app throws an exception, but If i am not sitting in front of my screen watching, what has failed I would not know.

    Does any one know of any way that I can catch that exception, and then throws that exception to my result file.
    I would really appreciate your feed back.
    Thanks

    [This message has been edited by qa_consultant (edited 03-01-2001).]

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

    Re: Need to capture the error messages and direct them to result file

    You may want to try a screen capture function.
    Browser.CaptureBitmap("c:\error.bmp")

    that way you can take a screen capture of the error and look at it later

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Location
    lombard, IL, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to capture the error messages and direct them to result file

    Thanks for your info, that could be a good way, but I have another question. Lets see in my script I have 10 lines and script fails at line 2. But Browser.Capture () function was lets see at the very end of the script, Now How I can handle that ?

    Anny suggestions !

  4. #4
    Guest

    Re: Need to capture the error messages and direct them to result file

    Study the do...except loop. That will allow your code to jump to an error handler that can call your screen capture or whatever else you may want in the event of an error.

  5. #5
    Junior Member
    Join Date
    Mar 2001
    Location
    lombard, IL, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to capture the error messages and direct them to result file

    Can I try doing this way.

    //Begin
    testcase do_except_ ()
    STRING sTestValue = "xxx"
    STRING sExpectedValue = "yyy"
    do
    TestVerification (sExpectedValue, sTestValue)
    except

    ErrorHandler ()
    Browser.CaptureBitmap(c:\test.bmp)

    //Then here my test action or script.
    //end

    what you think
    any suggestion!


    [This message has been edited by qa_consultant (edited 03-01-2001).]

  6. #6
    Guest

    Re: Need to capture the error messages and direct them to result file

    Yea, that looks like it might work. Try it and find out. Just make sure that your call to ErrorHandler() is made after the except statement.

    //Begin
    testcase do_except_ ()
    STRING sTestValue = "xxx"
    STRING sExpectedValue = "yyy"
    do
    TestVerification (sExpectedValue, sTestValue)
    except
    ErrorHandler()

    ErrorHandler ()
    Browser.CaptureBitmap(c:\test.bmp)

    //Then here my test action or script.
    //end


  7. #7
    Junior Member
    Join Date
    Mar 2001
    Location
    lombard, IL, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to capture the error messages and direct them to result file

    Well I tried that way and no matter script fails or pass it try to go to ErrorHandler function (which is Browser.CaptureBitmap ("c:\test.bmp") )
    and execute that.

    Any more suggestions.!



    [This message has been edited by qa_consultant (edited 03-01-2001).]

  8. #8
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to capture the error messages and direct them to result file

    Hi,

    Make sure that the call to the ErrorHandler () is nested within the except branch.

    John.
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.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 04:14 PM.

Copyright BetaSoft Inc.