Docsity

Slides on Software Statistical Testing | CSE 565, Study notes of Computer Science

Partial preview of the text

Download Slides on Software Statistical Testing | CSE 565 and more Study notes Computer Science in PDF only on Docsity!

Software Statistical Testing

Wei-Tek Tsai

Department of Computer Science and

Engineering

Arizona State University

Tempe, AZ 85287

Statistical Testing (Black Box)

  • Purpose
    • To certify that a certain level of reliability has

been reahed

  • Basic idea
    • Tests are generated on realistic user model
    • Statistical testing allows testing to be used to

determine reliability, not to identify failures

Example (1/3)

( 0 1 : 0 ))

( 0 1 : ( )/ |

( 0 1 , : 5 , 0 )|

(( 0 1 , : 5 , / )|

= ∧ ≤ → =

= ∧ > → = −

≠ ∧ ≤ → =

≠ ∧ > → =

x z z

x z z z x x

x z y z

x z y z z x

Example (2/3)

  • Based on the equivalence class approach

four cases can be distinguished

T F 1

TF1,1 TF1,2 TF1,3 TF1,

P1=. P2=.10 P3=.^

P4=0.

Advantages of Statistical Testing

  • Test data can be automatically checked (See

[Poore et al.] for example tools)

  • Usage models can created during the

development of the unit requirements

without knowledge of the actual test (I.e.,

developers can’t use a knowledge of

specific tests)

  • Reliability of a unit can be predicted

Denifitions (1/4)

  • Reliability is the measure that will

yield the correct result for a randomly select

usage

  • MTTF (mean time to failure): Average

number of uses between two failures

ex Xi

Definitions (2/4)

  • MTTF (mean time to failure)

(tie is defined as the number of usages or test)

− reliabilit y

⇒ = 1

1 MTTF

… …

100 99/

10 9/

0 1

MTTF Reliability

Definitions (3/4)

  • MTTF (mean time to failure)

Where: r: desired reliability

c: significance (I.e., the probability

with which a certain reliability is

to be expected)

ln( )

ln( 1 )

Tests

r

− c ⇒ =

Software Reliability

  • The probability of failure-free operation for

a specified time, in a specified environment

(Musa).

[S/W reliability: freedom from failures]

Understanding Software reliability (1)

  • Software reliability does not mean a

property of a static piece of code.

  • It is a property of an executing program and

depends on the environment, that is, the

operational conditions under which the

program executes.

Understanding Software

reliability (2)

  • The program environment is stochastic in a

sense that neither the values not time

instants of input signals can be predicted

deterministically (they occur randomly).

Understanding Software

reliability (3)

  • Using statistical methods in software

reliability assessment is thus justified by the

stochastic nature of program’s execution

(Assuming probability distribution for

inputs).

Basic Parameters of Software

Reliability Models

• - cumulative num of failures by time t

- failure intensity

(num of failures per unit time)

μ = λ * t

( ) ( ) t

dt

d

λ t = μ

Software Failure Modeling (1)

• Software failure occurrence can be modeled

by a Poisson process

P – probability of num of failures at time t

n – number of failures at time t

- cumulative num of failures by t

( ) ( )^

( ) t

n e n

t P nt μ − μ = !

Software Failure Modeling (2)

  • Probability that n software failures will

have occurred depends on the cumulative

number of failures, , expected to

occur in t units of time

( ) n ( ) t e n

t P n μ

μ (^) −

!

[]

μ ( t )

Software Failure Modeling (3)

  • Probability that there are no failures at time

t is software reliability (n = 0)

( )

( t ) R t e

− μ

Static Model Formulas

  • Mean value function:
  • Failure intensity function:
  • Software reliability:

μ ( t ) = λ 0 ∗ t

λ ( t ) = λ 0

R ( t ) = e − λ^0 t

Basic Model Formulas

  • initial software failure intensity
  • total num of failures over the

infinite amount of execution time

( ) (^)  

t = − − t 0

0 0 1 exp ν

λ μ ν

( ) (^)  

t (^) = − t 0

0 (^0) exp ν

λ λ λ

λ^0

ν^0

Logarithmic Poisson Model

Formulas

  • exponential drop in failure intensity

as faults are corrected

( ) ln( 1 )

μt = (^) θ λ 0 θt +

( ) 0 1

0

t

t λθ

λ λ

θ

Static Model

t

μ ( t )

t

λ ( t )

l 0

Characterization of basic Model

and Log-Poisson Model (1)

t

λ ( t )

Basic Model

λ ( t )

Log-Poisson Model

A λ 0

A B λ 0 (^) > λ 0

t

B λ 0

A λ 0

B λ 0

Characterization of basic Model

and Log-Poisson Model (2)

t

λ ( t )

Basic Model

λ ( t )

Log-Poisson Model

q (^) A > q B

t

λ 0

A B ν 0 (^) > ν 0

B ν 0

A ν 0

λ 0

θ B

θ A

Other Models (1)

  • Finite models:
  • Infinite modeles: (^) μ ( ∞) =∞

μ ( ∞) <∞

Other Models (2)

  • Power model:
  • Delayed S-shape
  • Inverse linear
  • Log power

λ ( t ) = αβtβ −^1

λ ( t ) = αβt exp( − βt )

2

( ) t

t β

αβ λ

= 21

( )

[ ( )]

t

in t t

=

−

1

1

β 1 αβ λ

Rayleigh Software Reliability

Model (2)

  • Special case of the Weibull probability

distribution (m=2)

( ) 

 

 

  

  

 =− −

m

c

t μt 1 exp

( ) 

 

 

  

  

  − 

  

m m

c

t

c

t

t

m λt exp

Derivation of the Basic Model (1)

  • The expected number of faults detected in

is proportional to the number of

remaining faults:

( ) ( ) c [ ( ) t ] t

t t t ν μ

ϖ μ = − ∆

  • ∆ − 0

[ t , t +∆ t ]

Derivation of the Basic Model (2)

  • With the equation becomes

Which has a solution

Where

∆ t → 0

μ^ & ( t ) = const [ ν 0 − μ ( t )]

μ ( t ) = ν 0 [ 1 −exp( const * t )]

0

0 ν

λ const =

Categories of Reliability Models

  • Static
  • Dynamic
    • Covering entire process
    • Covering testing phase