• Keine Ergebnisse gefunden

Objectives of this unit:

N/A
N/A
Protected

Academic year: 2022

Aktie "Objectives of this unit:"

Copied!
15
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

5. Testing

Objectives of this unit:

Notions: fault management, software testing, dependability

• A (very brief summary of ) Methods and techniques of Fault

Management

(2)

Fault “Management”

Exception Handling

. . .

Process Restart/Check- pointing

Recovery Block Techn.

Process Replication Fault Recovery

Formal Methods . . .

Non-formal Methods . . .

N-Version Programming Diversitary Programming

Defensive Programming

Fault Masking Fault Avoidance

Analysis Fault Removal/Test Construction

Fault Exclusion Fault Tolerance

Fault-Intolerant Development Fault-Tolerant Operating Quantification

Metrics/Reliability

Mathematical Methods Software Engineering Methods

...

Metrics/Reliability

Mathematical Methods

(3)

Analysis (static) Test (dynamic) Formal Methods

(Correctness Proof, Symbolic Execution, Algebraic Methods, (Dynamic)Assertions),

Non-formal Methods, (Review/Walkthrough/

Inspection)

Semi formal/Empirical Methods

Hybrid Methods (KE)

Software Testing – Techniques and Tools

Summary of Validation & Verification Methods

(4)

Dependability and Fault Management

Faults

Errors

Malfunctions

Failures Undesirable Situations/

Events („Impairments“) Deviations

. . .

Measures

Reliability

Availability Safety

Security

. . .

Countermeasures/

Means

Assessment Procurement

. . .

Introduction

(5)

Undesirable events

Faults

Failures

(6)

Non-occurence of unauthorized

disclosure / improper alteration of

information

Non-occurence of catastrophic consequences onto environ- ment

Security / Safety

(7)

Functional View

x aa AA

E A

EN

AN

e xn x an

x ea EA

P

P

e

x af

P x af´

fx

test case = (input, expected output)

Example:Test cases: tc1 = (en,an), tc2 = (ea,aa), tc3 = (ef,a) Test spec:= {(en,an ), (ea,aa), (ef,a)}

(8)

Why Testing?

Example: (G. Myers, 1975)

Given: A program P

accepts inputs a, b, c as edges of a triangle

∆ and determines whether ∆ is

-

equilateral - isosceles, or - scalene.

-

Find: Test cases to validate P

.

(9)

2,2,3

3,2,2 (a = b ∨ b = ca = c) leads to ∆ isosceles 3,2,3

2,2,2 (a = b ∧ b = c) leads to ∆ equilateral

Test Cases: I. Regular (desirable) situation

(Input leads to Output)

2,3,4 (a ≠ bc) leads to ∆ scalene

(10)

2,2,4 (a + b = c)

2,4,2 (a + c = b) error message 2

4,2,2 (b + c = a) 0,2,3 (one arc = 0)

2,0,3 one arc = 0) error message 3 2,3,0 (one arc = 0)

0,0,3 (two arcs = 0)

0,3,0 (two arcs = 0) error message 4 3,0,0 (two arcs = 0)

Test Cases: II. Irregular (undesirable) situations

2,2,5 (a + b < c) 2,5,2 (a + c < b)

5,2,2 (b + c < a) error message 1

(11)

Test Cases: II. Irregular Cases (Contd.):

-2, 3, 4 (negative figure)

2,-3, 4 (negative figure) error message 6

2, 3,-4 (negative figure) -2,-3, 4 (negative figure)

-2, 3,-4 (negative figure) error message 7

2,-3,-4 (negative figure)

-2,-3-4 (negative figures) error message 8

1.2,3 ,2 (no integers)

1 ,3.1.,2 no integers) error message 9

1 ,3 ,2.1 no integers) 1,2,# (no numbers)

1,B,3 (no numbers) error message 10

X,2,3 (no numbers) 1,2 (only two inputs)

1 (only one input) error message 11

(12)

Programs

– 2 selections, executed (iterated) once:

{abe, ace} → 21 = 2 paths – 2 selections, executed twice:

{abe, ace, abdbe, abdce, acdbe, acdce} → 22 + 21 = 6 paths

– 2 selections, executed three times:

{...} → 23 + 22 + 21 = 14 paths

Example

sel1

sel2

event1 event2

Y Y N

N

b c

d

e a

= n

i

d

1

General: p := i p : number of paths d : number of selections n : number of executions

(13)

Filtering the relevant...

(14)

Coverage-Oriented „Debugging“

Module Test Sub-System Test Integration Test System Test . . .

„Bottom-up“-Test

„Top-down“-Test

„Sandwich“-Test Hypothesis/ Method Selection Component Level Direction

Test Strategies

Control Flow-oriented (C0-,C1-, ..., C-Test) Data Flow-oriented (dd-, dk-, kk-, ... -Test) . . .

White-Box(Implementation/Structure-oriented)

Black-Box(Specification/Function-oriented) Operational Profile

Sensitive

Cause-Effect Analysis

Equivalence Classes/Partition Test Special Value-/Domain Test

Diversity:Mutations-/Back-to-Back Test Gray-Box Testing

Node/Arc-Coverage (double/triple-, ...,

edge-coverage -Test)

Random-/Anti-Random Testing

(15)

Referenzen

ÄHNLICHE DOKUMENTE

Higher-order logic, interactive provers (Isabelle/HOL) fragments of C and their specification languages Hoare logic (specification of pre and post conditions) embedded systems,

Otherwise, assigning false to the yet unassigned atomic sentences makes all the conditionals (and hence also the Horn sentence) true.... Correctness of the

Axiomatic method: bridge the gap between Tarski’s World validity and FO validity by systematically expressing facts about the meanings of the predicates, and introduce them as

SPASS is a theorem prover for finite theories in first-order logic Induction is an axiom schema (with infinitely many instances) In Hets, select “CASL2SoftFOLInduction2”; then

clogged radiator Radiator is clogged defective carburetor Carburetor is defective worn rings Piston rings are worn worn seals Valve seals are worn replace auxiliary Replace

It is illustrated how fun- damental methods of static analysis, in particular abstract interpretation by interval analysis, contribute to the solution of problems typically

Therefore, we devised several methods based on the notion of implications in formal contexts to find such components, and tried to evaluate them experimentally on some real-world

The final sec- tion of this chapter on spoken language understanding technology, section 1.8, discusses the integration of speech recognition and natural language