SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Montreal, CA
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error Handling after Verify() failure

    I did see some of the earliest posts regarding this topic. But I am looking for something different.
    In SilkTest if Verify function failed, the control will go to testcase exit function by terminating script. Adding do...except is one way of doing this.
    I want to know, whether there is any other way handling this commonly in testcase exit function or writing a common error handling function which can be called automatically whenever an exception occurs and continue the execution of rest of the script.
    Thanks for the help,

    Murali K Parepalli
    Intuit
    _ _ ___________ _ _
    Murali K Parepalli

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Chennai,TN,India
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error Handling after Verify() failure

    Check in the TestCase Exit function whether Exception Number not null(where the Silk Exceptions are represented as negative numbers),if so there is an Exception,then handle in your own fashion.

    Use ExceptNum() Function to identify the Exception Number Whenever there is an Exception raised by the Silk.
    Note: Refer 4test.inc file in SilkTest Installation Directory.

    You can also handle it with in "do - except" statement by calling an Exception function within except(may be passing an Error Number).

    Depends on the Severity of the Error "Proceed" or "Abort" the process by reraising the exception.

    Hope this does.



    ------------------
    Babu NM
    Babu NM

  3. #3
    Member
    Join Date
    Apr 2001
    Location
    Montreal, CA
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error Handling after Verify() failure

    I got solution in different way.
    I wrote my own Verify Function and replaced Verify Calls with vVerifyData ..as follows:
    [-] void vVerifyData(ANYTYPE aActualData,ANYTYPE aExpectedValue,ANYTYPE aTitle optional)

    [-] do
    [ ] Verify(aActualData ,aExpectedValue,aTitle)
    [-] except
    [ ] ErrorHandler()

    This worked for me.
    Thanks for the response,
    ------------------
    Murali K Parepalli
    Intuit



    [This message has been edited by aspmurali (edited 09-03-2002).]
    _ _ ___________ _ _
    Murali K Parepalli

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error Handling after Verify() failure

    Gentlemen,

    Thats the only way of handling exception in Verify as unlike anyother statements if Verify fails it bails out and terminates the test case.

    ------------------
    Sree
    Sree

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error Handling after Verify() failure

    Hi Murali !

    I solve the problem the same way, by writing special versions of Verify().
    One nice trick to learn is that when a Verify() error is logged in the results, you can highlight the error and select "Results -> Update Expected Value" to automatically copy/paste the data into your test.

    This trick does not work unless you add "hidecalls" to your special Verify().

    A bug in SilkTest also requires that you either eliminate the optional "Description" parameter, or move it and make it required.

    Run this code to generate an error, then select "Results -> Update Expected Value" to see what I mean:

    Please email me at
    kapteynr @ cboe.com

    I'd like to hear how you like San Diego !


    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.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 12:52 AM.

Copyright BetaSoft Inc.