Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Scripting QTP - CH06 - Error Handling

Scripting QTP - CH06 - Error Handling

Ratings: (0)|Views: 109 |Likes:
Published by Pankaj Sharma
Scripting QTP - CH06 - Error Handling QTP Book By Danish
Scripting QTP - CH06 - Error Handling QTP Book By Danish

More info:

Published by: Pankaj Sharma on Aug 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/07/2012

pdf

text

original

 
Chapter 06 Scripting Quicktest Professional Page 1
W
E
H
F
T
W
D
O
T
F
E
F
D
E
E
H
G
E
H
Q
T
P
D
V
E
P
S
E
S
Q
T
S
O
E
P
S
D
O
O
W
D
S
I
W
S
I
U
S
I
P
W
I
I
A
E
S
R
E
S
R
E
R
S
I
R
S
R
T
T
A
Dani Vainstein Error Handling Page 1 of 38
 
Chapter 06 Scripting Quicktest Professional Page 2
R
O
S
L
A
T
D
S
E
O
N
E
S
O
N
E
R
N
P
C
E
O
E
O
P
M
Error Handling
There are two ways of producing error-free software.But only the third will work ...
Unknown Author
There are bugs than can eliminate an entire project.There are also bugs that can kill people.Reliability is a major characteristic of high-quality software.Software should behave well in nearly every situation.During the development process, we try to avoid, detect and remove as many errors aspossible.We cannot assume that the delivered software is free of errors. Therefore, we have to thinkabout mechanisms to protect the productive system from unacceptable behavior while anerroneous situation occurs.
Dani Vainstein Error Handling Page 2 of 38
 
Chapter 06 Scripting Quicktest Professional Page 3
Why Error Handling?
Reliability is a major characteristic of high-quality software. Software should behave well innearly every situation. During the development process, we try to avoid, detect and removeas many errors as possible. Because I consider that developing
QuickTest
scripts is thesame a software development, and both must be treat the same way. Nevertheless, wecannot assume that the delivered software is free of errors. Therefore, we have to thinkabout mechanisms to protect the productive system from unacceptable behavior whileerroneous situations occur.If you are an experience automation tools developer, or automation tools user, how manytimes did you have to rerun a script to investigate what went wrong with the previous run?After each run, you have to make an analysis on the results. A good detailed report canmake the difference.
Fault Tolerance
The major difference between a thing that might go wrong and a thing that cannotpossibly go wrong is that when a thing that cannot possibly go wrong goes wrong.it usually turns out to be impossible to get at or repair.
Douglas Adams
A system able to recover from errors and to restore normal operation is called
faulttolerant
. Depending on the criticality of a system fault tolerance has many facets.Especially in safety critical applicationsIn the domain of business information systems, the major concern is to guarantee thecorrectness and integrity of the data and to prevent any corruption and loss of data. In anerror situation (especially design faults), it is generally not possible to correct the fault on-line and so it is probable that the same error occurs again. Furthermore, there is the dangerto proceed with inconsistent or corrupted data. Thus in most cases we do not try to recover(only if sensible) from errors in order to continue normal operation, but we try to terminate(when necessary and possible) the application in a consistent way.Error recovery in fault tolerant systems is very complex and expensive. It is used in safetycritical applications where availability and timing are important requirements. In the domainof business information systems, which are often critical too but with other requirements, itis usually more effective to invest in error prevention during development and robustness of the productive system.
What to Do?
To behave well in nearly every situation the Scripts has to cope not only with the normalsituations but also with a number of unexpected situations. Thus the motto should be:
Expect the Unexpected!
 During normal operation a script that test a program is in a „good state“, but normally theset of good states is only a subset of the set of all technically possible states. So there willbe many „bad states“ and we want to avoid the script that test the application running intosuch a state.With error handling we want to reach the following goals:
Dani Vainstein Error Handling Page 3 of 38

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->