GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Testing Tools  >  SilkTest
Go To First  |  Previous Question  |  Next Question 
 SilkTest  |  Question 2 of 24    Print  
what is the use of exception handling in Silk Test? how to use the commands?

  
Total Answers and Comments: 4 Last Update: April 23, 2009     Asked by: rammu 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 21, 2006 07:23:09   #1  
Sheebha        

RE: what is the use of exception handling in Silk Test...

If a testcase fails during the test execution (for ex if the expected value doesn't match the actual value in the verification statement) SilkTest by default calls its built-in recovery system which:

> Terminates the testcase

> Logs the error in the results file

> Restores your application to its default base state in preparation for te next test case.

Commands:

Using do...except

do


 
Is this answer useful? Yes | No
August 21, 2006 07:31:50   #2  
sheebha        

RE: what is the use of exception handling in Silk Test...

Commands: do command

do

exception raised here

except

statements

....

control passes

....

Example:

testcase except1(STRING sExpectedVal STRING sActualVal)

do

Verify(sExpectedVal sActualVal)

Print( Verification succeeded )

except

Print( Verification Failed )

Raise Command

In addition to use buil-in exceptions you can define your own exceptions and generate them using the raise statement

Reraise Command

You can also use do...except to perform some custom error handling then use the reraise statement to pass control to te recovery system as usual


 
Is this answer useful? Yes | No
December 28, 2006 02:20:54   #3  
Naresh J        

RE: what is the use of exception handling in Silk Test...

Hi

When ever you execute any Testcase in Automation 2 things are always mandatory.

  1. Prevalidation or verification for the exsisting Window/browser.
  2. Post validation or verification of Next Window/Browser.

Now during execution any other window/ browser is poping up etc then those are called exception's and that needs ur attention.

And that can be handled by DO EXCEPT method as said by Sheebha.

Well coming to what happends when a exception occurs WITHOUT a do except method is clearly explained by Sheebha. But it applies only for Default base state not for the Rest. Also it does not apply when u run in suit file.

Regards

Naresh J


 
Is this answer useful? Yes | No
April 21, 2009 03:35:58   #4  
test12geeta Member Since: April 2009   Contribution: 3    

RE: what is the use of exception handling in Silk Test? how to use the commands?

Suppose there is a testcase which has 3-verification functions in each verification function there is Do Except error handling statement.

In this case if first verification function fails it will log the result to result file. the rest two verification functions will execute without aborting the test case.
so once the test case executes completely user can see the result file and come to the conclusion which verification function got failed.

This is one use of exception handling.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape