Many Facets of the Test Oracle Problem Prof. T.H. Tse The - - PowerPoint PPT Presentation

many facets of the test oracle problem
SMART_READER_LITE
LIVE PREVIEW

Many Facets of the Test Oracle Problem Prof. T.H. Tse The - - PowerPoint PPT Presentation

Even the Very Wise Cannot See All Ends: Many Facets of the Test Oracle Problem Prof. T.H. Tse The University of Hong Kong Pokfulam, Hong Kong Formula for A Successful Keynote Speech { ? ! " " _ ^ -> :-) } 2 Formula for A


slide-1
SLIDE 1

Even the Very Wise Cannot See All Ends:

Many Facets of the Test Oracle Problem

  • Prof. T.H. Tse

The University of Hong Kong Pokfulam, Hong Kong

slide-2
SLIDE 2

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

2

slide-3
SLIDE 3

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

3

Comprehensive coverage

slide-4
SLIDE 4

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

4

Comprehensive coverage Bold questions

slide-5
SLIDE 5

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

5

Comprehensive coverage Bold questions Provocative assertions

slide-6
SLIDE 6

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

6

Comprehensive coverage Bold questions Provocative assertions Learn from gurus

slide-7
SLIDE 7

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

7

Solid foundations

slide-8
SLIDE 8

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

8

Solid foundations Advanced concepts

slide-9
SLIDE 9

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

9

Solid foundations Advanced concepts Avoid formalism

slide-10
SLIDE 10

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

10

Real-world applications

slide-11
SLIDE 11

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

11

Interesting stories Real-world applications

slide-12
SLIDE 12

Formula for A Successful Keynote Speech

{ ? ! " " _ ^ ∉ -> :-) }

12

Inspiring conclusions. Interesting stories Real-world applications

slide-13
SLIDE 13

Presentation Outline

 Formula for a successful keynote speech  A successful keynote speech.

13

slide-14
SLIDE 14

Presentation Outline

 Background

14

slide-15
SLIDE 15

Presentation Outline

 Background  Many facets of the test

  • racle problem

15

slide-16
SLIDE 16

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

16

slide-17
SLIDE 17

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

17

slide-18
SLIDE 18

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

18

slide-19
SLIDE 19

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals

19

slide-20
SLIDE 20

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?

20

slide-21
SLIDE 21

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?  What do other

researchers do?

21

slide-22
SLIDE 22

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?  What do other

researchers do?

 Trim the tree or

tame the forest? .

22

slide-23
SLIDE 23

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?  What do other

researchers do?

 Trim the tree or

tame the forest?

23

slide-24
SLIDE 24

24

Summary of My Work

 Testing of object-oriented software

 Black and White [ACM TOSEM 1998]  TACCLE

[ACM TOSEM 2001]

 VITAMIN

[Communications of the ACM 2007]

 Equality to Equals and Unequals

[IEEE TSE 2013].

slide-25
SLIDE 25

25

 Testing pervasive software

 [COMPSAC 2004 best paper]  [FSE 2006]  [ICSE 2008].

Summary of My Work

slide-26
SLIDE 26

26

 Testing services computing

 [ICSE 2008b]  [FSE 2009]  [WWW 2009]  [IEEE TSC 2015 spotlight paper]  [IEEE TSC 2015b].

Summary of My Work

slide-27
SLIDE 27

27

Summary of My Work

 Testing based on formal specifications

 Tabular Expressions [IEEE TSE 2011]

slide-28
SLIDE 28

28

Summary of My Work

 Testing based on formal specifications

 Tabular Expressions [IEEE TSE 2011]

 Testing based on informal specifications

 CHOC’LATE [IEEE TSE 2003] 

[Communications of the ACM 2010]

 DESSERT

[IEEE TSE 2012].

slide-29
SLIDE 29

29

 Spectrum-based fault localization

 [COMPSAC 2008 best paper]  [FSE 2009b]  [IEEE Computer 2012]

Summary of My Work

slide-30
SLIDE 30

30

 Spectrum-based fault localization

 COMPSAC 2008 best paper]  [FSE 2009b]  [IEEE Computer 2012]

 Debugging of concurrent systems

 [Information Sciences 2012]  [ISSTA 2012].

Summary of My Work

slide-31
SLIDE 31

31

 Integration of testing, debugging, and proving

 [COMPSAC 2009 best paper]  [QSIC 2011 best paper]  [IEEE TSE 2011b].

Summary of My Work

slide-32
SLIDE 32

32

Selected PhD Graduates

Dr Ke Zhai, Goldman Sachs. Dr W.K. Chan, Associate Professor, City University of Hong Kong Dr Bo Jiang, Associate Professor, Beihang University Dr Zhenyu Zhang, Associate Professor, Institute

  • f Software, Chinese Academy of Sciences

Dr Lijun Mei, IBM Research  China

slide-33
SLIDE 33

Dr Yan Cai, Associate Professor, Institute of Software, Chinese Academy of Sciences.

33

Selected PhD Graduates

Dr Ke Zhai, Goldman Sachs Dr W.K. Chan, Associate Professor, City University of Hong Kong Dr Bo Jiang, Associate Professor, Beihang University Dr Zhenyu Zhang, Associate Professor, Institute of Software, Chinese Academy of Sciences Dr Lijun Mei, IBM Research  China

slide-34
SLIDE 34

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?  What do other

researchers do?

 Trim the tree or

tame the forest?

34

slide-35
SLIDE 35

The Test Oracle Problem

Even the Very Wise Cannot See All Ends:

Many Facets of the Test Oracle Problem

  • Prof. T.H. Tse

The University of Hong Kong Pokfulam, Hong Kong

Present 20 years of work in 45 minutes

35

slide-36
SLIDE 36

Even the Very Wise Cannot See All Ends:

Many Facets of the Test Oracle Problem

  • Prof. T.H. Tse

The University of Hong Kong Pokfulam, Hong Kong

Many Facets of the Test Oracle Problem

J.R.R. Tolkien

The Lord of the Rings Even the Very Wise Cannot See All Ends

36

slide-37
SLIDE 37

 Rawlinson and Bosworth

Professor of Anglo-Saxon, University of Oxford (1925−1945)

 Merton Professor of English

Language and Literature, University of Oxford (1945−1959).

Even the Very Wise Cannot See All Ends:

Many Facets of the Test Oracle Problem

  • Prof. T.H. Tse

The University of Hong Kong Pokfulam, Hong Kong

Many Facets of the Test Oracle Problem

J.R.R. Tolkien

The Lord of the Rings Even the Very Wise Cannot See All Ends

slide-38
SLIDE 38

Oracle

 A message supposedly from

God’s inspiration, usually given by a priest

slide-39
SLIDE 39

Oracle

 A message supposedly from

God’s inspiration, usually given by a priest

 An utterance of deep import

  • r wisdom; an opinion or

declaration regarded as authoritative and infallible; undeniable truth.

39

slide-40
SLIDE 40

Oracle

 A message supposedly from

God’s inspiration, usually given by a priest

 An utterance of deep import

  • r wisdom; an opinion or

declaration regarded as authoritative and infallible; undeniable truth.

slide-41
SLIDE 41

41

Test Oracle

 A test oracle is a mechanism to check whether  expected outcome according to the specification

= actual result of executing the implementation.

slide-42
SLIDE 42

42

Real-Life Search Engine Example

slide-43
SLIDE 43

43

Real-Life Search Engine Example

Is 2.77M results correct? .

slide-44
SLIDE 44

Challenge 1:

 Expected outcome = actual execution result

44

Many Facets of the Test Oracle Problem

slide-45
SLIDE 45

Metamorphic Testing

45

sin 0.9876 ? Expected 0.8347 Actual

slide-46
SLIDE 46

Metamorphic Testing

46

sin 0.9876 ? Expected 0.8347 Actual

 Cannot be verified because we do not know what to

expect

slide-47
SLIDE 47

Metamorphic Testing

47

sin 0.9876 ? Expected 0.8347 Actual ? Expected 0.8347 Actual sin (π – 0.9876)

 Take a follow-up test case:  Cannot be verified because we do not know what to

expect

slide-48
SLIDE 48

Metamorphic Testing

48

sin 0.9876 sin (π – 0.9876) ? Expected 0.8347 Actual ? Expected 0.8347 Actual

slide-49
SLIDE 49

Metamorphic Testing

49

sin 0.9876 sin (π – 0.9876) ? Expected 0.8347 Actual ? Expected 0.8347 Actual

slide-50
SLIDE 50

Metamorphic Testing

50

sin (π – 0.9876) ? Expected 0.8347 Actual sin 0.9876 = sin (π – 0.9876) Expected metamorphic relation sin 0.9876 ? Expected 0.8347 Actual

slide-51
SLIDE 51

Metamorphic Testing

51

sin (π – 0.9876) ? Expected 0.8347 Actual sin 0.9876 = sin (π – 0.9876) Expected metamorphic relation sin 0.9876 ? Expected 0.8347 Actual

slide-52
SLIDE 52

Metamorphic Testing

52

sin (π – 0.9876) ? Expected 0.8347 Actual sin 0.9876 = sin (π – 0.9876) Expected metamorphic relation 0.8347 = 0.8347 Actual relation sin 0.9876 ? Expected 0.8347 Actual

slide-53
SLIDE 53

53

Real-Life Search Engine Example

Apply Metamorphic Testing

Real-Life Example

Is 2.77M results correct? .

Metamorphic Relation: More refined search should produce fewer number of entries.

slide-54
SLIDE 54

Real-Life Search Engine

More entries indicate failure in search engine. Refine to “children’s hospital of chicago” .

slide-55
SLIDE 55

Real-Life Search Engine Example

Is 4.54M results correct? .

slide-56
SLIDE 56

Real-Life Search Engine

More entries indicate failure in search engine. Refine to “children’s hospital of chicago” .

slide-57
SLIDE 57

Real-Life Search Engine Example

Human Issues

 Microsoft Research selected our project for a

Virtual Earth award

 Google asked us to submit a bug report  Each of my brothers has 2 doctoral degrees  I have only one doctoral degree.

57

slide-58
SLIDE 58

Metamorphic Testing

Other Real-World Applications

58

 Services computing  Ubiquitous computing  Concurrent systems  Graphic applications  Numerical programs.

slide-59
SLIDE 59

Metamorphic Testing

Recent Track Records

59

Compilers

 Based on metamorphic testing, an “equivalence

modulo inputs” technique identified 147 unique faults in GCC and LLVM using one metamorphic relation

slide-60
SLIDE 60

Metamorphic Testing

Recent Track Records

60

Compilers

 Based on metamorphic testing, an “equivalence

modulo inputs” technique identified 147 unique faults in GCC and LLVM using one metamorphic relation

Siemens Suite

 Detected 3 new faults in Siemens suite after its long

history of test case studies.

slide-61
SLIDE 61

Challenge 2:

61

Many Facets of the Test Oracle Problem

 Expected outcome = actual execution result

slide-62
SLIDE 62

Challenge 2:

62

 Consider the testing of real-life object-oriented

software.

Many Facets of the Test Oracle Problem

 Expected outcome = actual execution result

slide-63
SLIDE 63

Testing of Object-Oriented Software

Our Real-Life Experience

63

 Technology-transfer

project for ASM, the world’s largest supplier

  • f assembly and

packaging equipment for the semiconductor industry.

slide-64
SLIDE 64

Testing of Object-Oriented Software

64

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual

Simple concept in specification Complex implementation

slide-65
SLIDE 65

Challenge 2:

 Expected outcome = actual execution result  Consider the testing of real-life object-oriented

software

65

Many Facets of the Test Oracle Problem

Cannot define “=” at two different levels of abstraction.

slide-66
SLIDE 66

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

66

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual

slide-67
SLIDE 67

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

67

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip

slide-68
SLIDE 68

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

68

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected

slide-69
SLIDE 69

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

69

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual

slide-70
SLIDE 70

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

70

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual

slide-71
SLIDE 71

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

71

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual

slide-72
SLIDE 72

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

72

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual Equivalent Expected relation

slide-73
SLIDE 73

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

73

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual Equivalent Expected relation

slide-74
SLIDE 74

Testing of Object-Oriented Software

Mimic Metamorphic Testing?

74

Robotic arm after handling problem chip Home afresh Expected Home afresh Actual Robotic arm after handling standard chip Home afresh Expected Home afresh Actual Equivalent Expected relation Equivalent Actual relation

slide-75
SLIDE 75

 An implementation P is correct with respect to the

specification Sp if and only if

 For any pair of equivalent sequences of

  • perations in Sp, the actual objects resulting

from P must be equivalent .

Target of OO Software Testing

75

slide-76
SLIDE 76

76

Challenge 3:

Many Facets of the Test Oracle Problem

What is object equivalence?

 Object A = object B

slide-77
SLIDE 77

What is Object Equivalence?

Real-Life Word Processing Example

slide-78
SLIDE 78

What is Object Equivalence?

Real-Life Word Processing Example

slide-79
SLIDE 79

What is Object Equivalence?

Real-Life Word Processing Example

Call this

  • bject O.
slide-80
SLIDE 80

What is Object Equivalence?

Real-Life Word Processing Example

Click “Hidden”.

slide-81
SLIDE 81

What is Object Equivalence?

Real-Life Word Processing Example

Call this

  • bject H.
slide-82
SLIDE 82

T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security.

82

What is Object Equivalence?

Output from Object H

slide-83
SLIDE 83

What is Object Equivalence?

Real-Life Word Processing Example

Take

  • bject O

again.

slide-84
SLIDE 84

What is Object Equivalence?

Real-Life Word Processing Example

Delete.

slide-85
SLIDE 85

What is Object Equivalence?

Real-Life Word Processing Example

Call this

  • bject D.
slide-86
SLIDE 86

86

What is Object Equivalence?

Output from Object D

T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security.

slide-87
SLIDE 87

What is Object Equivalence?

Attributive Equivalence

 Two objects will be attributively equivalent if they

have the exactly the same visible attributes

= ?

H D

87

slide-88
SLIDE 88

T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security. T.H. Tse is an Honorary Professor in Computer Science at The University of Hong Kong. He is a Steering Committee Chair of the IEEE International Conference on Software Quality, Reliability & Security.

=

H D

88

What is Object Equivalence?

Attributive Equivalence

 Simple to test  But the definition is too weak to be useful ...  Why? .

slide-89
SLIDE 89

What is Object Equivalence?

Real-Life Word Processing Example

Take

  • bject

H again (with hidden text).

slide-90
SLIDE 90

What is Object Equivalence?

Real-Life Word Processing Example

Click “¶”.

slide-91
SLIDE 91

What is Object Equivalence?

Real-Life Word Processing Example

Unclick “Hidden”.

slide-92
SLIDE 92

What is Object Equivalence?

Real-Life Word Processing Example

We get an

  • bject

that behaves like the

  • riginal
  • bject O.
slide-93
SLIDE 93

What is Object Equivalence?

Real-Life Word Processing Example

Take

  • bject

D again (with deleted text).

slide-94
SLIDE 94

What is Object Equivalence?

Real-Life Word Processing Example

Click “¶”.

slide-95
SLIDE 95

What is Object Equivalence?

Real-Life Word Processing Example

We do not get an

  • bject that

behaves like the

  • riginal O.
slide-96
SLIDE 96

What is Object Equivalence?

Observational Equivalence

 Two objects will be observationally equivalent

if they have the exactly the same visible attributes and behavior

H D

slide-97
SLIDE 97

What is Object Equivalence?

Observational Equivalence

 Ideal criterion in object-oriented software testing  But very very very very very very very very very

very very very very very very very very very very very very very very very very very very very very difficult to verify:

 Need to check an infinite combination of

possible behavior for every test case.

97

slide-98
SLIDE 98

 Cannot distinguish between visible and hidden

attributes and behavior

 Cannot distinguish between attributive and

  • bservational equivalence

UML State Machine Not Truly Suitable for OO Specification

98

= ?

slide-99
SLIDE 99

99

Algebraic Specification

 A ground term is a sequence of operations

 show(HKU QRS hide(TSE))

 An axiom is a rule that specifies the refinement of a

term

 hide(D D’) = hide(D) hide(D’)  show(D D’) = show(D) show(D’)  show(hide(D)) = show(D)  show(W) = W .

slide-100
SLIDE 100

Algebraic Specification

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

100

slide-101
SLIDE 101

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

show(HKU QRS hide(TSE))

Algebraic Specification

101

slide-102
SLIDE 102

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

show(HKU QRS hide(TSE)) ➔ show(HKU) show(QRS) show(hide(TSE))

102

show(D D’) = show(D) show (D’)

Algebraic Specification

slide-103
SLIDE 103

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

show(HKU QRS hide(TSE)) ➔ show(HKU) show(QRS) show(hide(TSE)) ➔ show(HKU) show(QRS) show(TSE)

Algebraic Specification

103

show(hide(D)) = show(D)

slide-104
SLIDE 104

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

show(HKU QRS hide(TSE)) ➔ show(HKU) show(QRS) show(hide(TSE)) ➔ show(HKU) show(QRS) show(TSE) ➔ HKU QRS TSE

Algebraic Specification

104

show(W) = W

slide-105
SLIDE 105

 A ground term may be transformed into another

using axioms as left-to-right rewrite rules, until it reaches a normal form

show(HKU QRS hide(TSE)) ➔ show(HKU) show(QRS) show(hide(TSE)) ➔ show(HKU) show(QRS) show(TSE) ➔ HKU QRS TSE

Algebraic Specification

Normal form.

105

slide-106
SLIDE 106

Algebraic Specification

Denotational Semantics

 Mathematical meaning  Like simultaneous equations

2x + 3y = 4 5x + 6y = 7

 “=” means “equals”  The order of the equations is not important.

106

slide-107
SLIDE 107

Algebraic Specification

Operational Semantics

 How the statements should be executed  Like C programs

j = 1; j = j + 2;

 Replace the variable on the left-hand side by the value

  • n the right-hand side.

107

slide-108
SLIDE 108

Canonical Algebraic Specification

 An algebraic specification is canonical if every

sequence of rewrites of a ground term produces a unique normal form

108

slide-109
SLIDE 109

Canonical Algebraic Specification

 An algebraic specification is canonical if every

sequence of rewrites of a ground term produces a unique normal form

show(HKU) show(QRS) show(hide(TSE)) ➔ show(HKU) show(QRS) show(TSE) ➔ HKU QRS TSE

109

slide-110
SLIDE 110

Canonical Algebraic Specification

 An algebraic specification is canonical if every

sequence of rewrites of a ground term produces a unique normal form

show(HKU) show(QRS) show(hide(TSE)) ➔ show(HKU) show(QRS) show(TSE) ➔ HKU QRS TSE show(HKU) show(QRS) show(hide(TSE)) ➔ HKU QRS show(hide(TSE)) ➔ HKU QRS TSE

110

slide-111
SLIDE 111

Canonical Algebraic Specification

 For a canonical specification, the operational

semantics agrees with the denotational semantics.

111

slide-112
SLIDE 112

 An implementation P is correct with respect to the

specification Sp if and only if

112

Target of OO Software Testing

According to Real-World Practice

slide-113
SLIDE 113

 An implementation P is correct with respect to the

specification Sp if and only if

 P satisfies the set (AE) of all attributively

equivalent pairs of ground terms in Sp

Target of OO Software Testing

According to Real-World Practice

For example, hide(TSE) and delete(TSE) are attributively equivalent.

113

slide-114
SLIDE 114

114

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

slide-115
SLIDE 115

 An implementation P is correct with respect to the

specification Sp if and only if:

 Equivalence Criterion

P satisfies the set (OE) of all observationally equivalent pairs of ground terms in Sp

115

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

slide-116
SLIDE 116

An implementation P is correct with respect to the specification Sp if and only if:

Equivalence Criterion P satisfies the set (OE) of all observationally equivalent pairs of ground terms in Sp

 Non-Equivalence Criterion

P satisfies the set (OE' ) of all observationally nonequivalent pairs of ground terms in Sp.

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

For example, hide(TSE) and delete(TSE) are observationally nonequivalent.

slide-117
SLIDE 117

Targets of OO Software Testing

117

AE OE U OE’

Real-world correctness, but very very very very very very very very very difficult to test. Real-world short-cut, but too weak to be useful

?

A jungle of proposals by various researchers.

slide-118
SLIDE 118

 An implementation P is correct with respect to the

specification Sp if and only if

 P satisfies the set (GI ) of all ground instances

  • f every axiom in Sp

Target of OO Software Testing

According to Bernot et al. (1991), Le Gall and Arnould (1996), Machado (1998, 2000), Machado and Sannella (2002), Aiguier et al. (2006)

118

slide-119
SLIDE 119

 An implementation P is correct with respect to the

specification Sp if and only if:

 Equivalence Criterion

P satisfies the set (RP) of all “equivalent” ground pairs such that one can be rewritten to the other using axioms in Sp as left-to-write rewrite rules

Target of OO Software Testing

According to Doong and Frankl (1994), Gaudel (1995), Zhu (2003)

119

slide-120
SLIDE 120

 An implementation P is correct with respect to the

specification Sp if and only if:

 Equivalence Criterion

P satisfies the set (RP) of all “equivalent” ground pairs such that one can be rewritten to the other using axioms in Sp as left-to-write rewrite rules

 Non-Equivalence Criterion

P satisfies the set (RP' ) of all “nonequivalent” ground pairs.

Target of OO Software Testing

According to Doong and Frankl (1994), Gaudel (1995), Zhu (2003)

120

slide-121
SLIDE 121

 An implementation P is correct with respect to the

specification Sp if and only if

 P satisfies the set (FP ) of all fundamental pairs

in Sp

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

121

slide-122
SLIDE 122

 An implementation P is correct with respect to the

specification Sp if and only if:

 Equivalence Criterion

P satisfies the set (NE) of all normally equivalent ground pairs in Sp

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

122

slide-123
SLIDE 123

 An implementation P is correct with respect to the

specification Sp if and only if:

 Equivalence Criterion

P satisfies the set (NE) of all normally equivalent ground pairs in Sp

 Non-Equivalence Criterion

P satisfies the set (NE' ) of all normally nonequivalent ground pairs in Sp

Target of OO Software Testing

According to Huo Yan Chen et al. (1998)

123

slide-124
SLIDE 124

 An implementation P is correct with respect to the

specification Sp if and only if

 P satisfies the set (CI ) of all ground instances of

every axiom in Sp that contains creators or constructors only.

Target of OO Software Testing

According to Aiguier et al. (2006)

124

slide-125
SLIDE 125

Targets of OO Software Testing

125

AE OE U OE’ GI RP U RP’ FP NE U NE’ CI

 Comparisons through empirical studies?

slide-126
SLIDE 126

What is Empirical Study?

 Research based on experimentation or observation

to answer a specific question or to test a hypothesis

 Undue emphasis in software engineering, even in

first-tier publication venues.

126

slide-127
SLIDE 127

What is Empirical Study?

 Statistical significance does not mean research

significance  A hypothesis may be very probable simply because it tells us nothing, or very little

Sir Karl Popper, Professor of Logic and Scientific Method, London School of Economics (1949−1969)

slide-128
SLIDE 128

What is Empirical Study?

 Statistical significance does not mean research

significance 

A hypothesis may be very probable simply because it tells us nothing, or very little

 A high degree of probability is therefore not an indication of “goodness”

Sir Karl Popper, Professor of Logic and Scientific Method, London School of Economics (1949−1969)

slide-129
SLIDE 129

What is Empirical Study?

 Statistical significance does not mean research

significance 

A hypothesis may be very probable simply because it tells us nothing, or very little  A high degree of probability is therefore not an indication of “goodness”

 It may be merely a symptom of low informative content.

Sir Karl Popper, Professor of Logic and Scientific Method, London School of Economics (1949−1969)

slide-130
SLIDE 130

Presentation Outline

 Background  Many facets of the test

  • racle problem

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Expected outcome

= actual execution result

 Jungle of proposals  Empirical studies?  What do other

researchers do?

 Trim the tree or

tame the forest?

130

slide-131
SLIDE 131

What Do Other Researchers Do?

General Relativity

luminiferous aether corpuscular model Lorentz’s theory of electrons general covariance field equations gravitational redshift hole argument gravitational time dilation principle of relative motion electromagnetic mass absolute space and time light constancy

131

 A jungle of proposals

slide-132
SLIDE 132

What Do Other Researchers Do?

General Relativity

132

So many people today — and even professional scientists — seem to me like somebody who has seen thousands of trees but has never seen a forest.

Albert Einstein The Collected Papers of Albert Einstein Princeton University Press

slide-133
SLIDE 133

What Do Other Researchers Do?

General Relativity

133

 Trim the individual trees?

What Do Others Do?

General Relativity

luminiferous aether corpuscular model Lorentz’s theory of electrons general covariance field equations gravitational redshift hole argument gravitational time dilation principle of relative motion electromagnetic mass absolute space and time light constancy

 A jungle of proposals

Albert Einstein

space time curvature

 Tame the forest!

slide-134
SLIDE 134

 Risk evaluation formulas

What Do Other Researchers Do?

Spectrum-Based Fault Localization

AMPLE2 Anderberg Arithmetic Mean Binary CBI Inc. Cohen Dice Goodman Euclid Fleiss Hamann Hamming, etc. Jaccard Naish1 M2 Kulczynski2 Naish2 Ochiai qe Rogers & Tanimoto Rogot1 Russel & Rao Scott Simple Matching Wong3 Wong2 Sokal Sørensen-Dice Tarantula Wong1

134

slide-135
SLIDE 135

What Do Other Reseachers Do?

Spectrum-Based Fault Localization

 Another jungle of proposals  Comparisons through empirical studies in IEEE

TSE, ICSE, and FSE.

135

slide-136
SLIDE 136

 Risk evaluation formulas

What Do Others Do?

Spectrum-Based Fault Localization

AMPLE2 Anderberg Arithmetic Mean Binary CBI Inc. Cohen Dice Goodman Euclid Fleiss Hamann Hamming, etc. Jaccard Naish1 M2 Kulczynski2 Naish2 Ochiai qe Rogers & Tanimoto Rogot1 Russel & Rao Scott Simple Matching Wong3 Wong2 Sokal Sørensen-Dice Tarantula Wong1

What Do Other Researchers Do?

Spectrum-Based Fault Localization

136

 Trim the individual trees?  Tame the forest!

T.Y. Chen and Team

slide-137
SLIDE 137

Spectrum-Based Fault Localization

According to T.Y. Chen and Team (2013)

 Theoretical framework to compare risk evaluation

formulas for single-fault programs

 No single formula can outperform the rest  Among the formulas under study, only five are

“maximal”

 Most of best-known formulas are not among them.

137

slide-138
SLIDE 138

Test Case Generation Techniques

According to T.Y. Chen and Team (2008)

 Prove that no test case generation technique can be

better than random testing by more than 50%

 in the absence of further information on possible

locations of failure-causing inputs

 Adaptive random testing is close to this theoretic

limit.

138

slide-139
SLIDE 139

Partition Testing Techniques

According to T.Y. Chen and Team (2000)

 Prove that proposed proportional sampling strategy

is the only partition testing technique that ensures probability of finding at least one failure is no lower than random testing for any program.

139

slide-140
SLIDE 140

140

Targets of OO Software Testing AE OE U OE’ GI RP U RP’ FP NE U NE’ CI

 Comparisons through empirical studies?

 Trim the individual trees?  Tame the forest!

Targets of OO Software Testing

slide-141
SLIDE 141

Toward Ultimate Target of OO Software Testing

Tame the Forest

 FP ⊂ CI ⊂ GI ⊂ RP ⊂ NE ⊂ OE ⊂ AE

141

Subset but not equal

slide-142
SLIDE 142

Toward Ultimate Target of OO Software Testing

Tame the Forest

 FP ⊂ CI ⊂ GI ⊂ RP ⊂ NE ⊂ OE ⊂ AE

142

Subset but not equal

 Hence, (P satisfies AE ) ⇒ (P satisfies OE )

⇒ (P satisfies NE ) ⇒ (P satisfies RP ) ⇒ (P satisfies GI ) ⇒ (P satisfies CI ) ⇒ (P satisfies FP ) and

 (P satisfies OE ∪ OE' ) ⇒ (P satisfies OE )

Not helpful. Not helpful.

 OE ⊂ OE ∪ OE'

slide-143
SLIDE 143

Ultimate Target of OO Software Testing

Tame the Forest

 Have we made full use of algebraic specifications?  Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE)

143

slide-144
SLIDE 144

Ultimate Target of OO Software Testing

Tame the Forest

 Have we made full use of algebraic specifications?  Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE)

⇔ (P satisfies OE)

144

slide-145
SLIDE 145

Ultimate Target of OO Software Testing

Tame the Forest

 Have we made full use of algebraic specifications?  Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE)

⇔ (P satisfies OE) ⇔ (P satisfies OE' )

145

slide-146
SLIDE 146

Ultimate Target of OO Software Testing

Tame the Forest

 Have we made full use of algebraic specifications?  Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE)

⇔ (P satisfies OE) ⇔ (P satisfies OE' ) ⇔ (P satisfies OE ∪ OE' )

146

slide-147
SLIDE 147

Ultimate Target of OO Software Testing

Tame the Forest

 Have we made full use of algebraic specifications?  Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE)

⇔ (P satisfies OE) ⇔ (P satisfies OE' ) ⇔ (P satisfies OE ∪ OE' ) ⇔ (P satisfies NE) ⇔ (P satisfies RP) ⇔ (P satisfies GI ) ⇔ (P satisfies CI) ⇔ (P satisfies FP).

147

slide-148
SLIDE 148

Ultimate Target of OO Software Testing

Tame the Forest

In short

 Given a canonical specification Sp with proper

imports and a complete implementation P

 (P satisfies AE) ⇔ (P satisfies OE ∪ OE' )

Real-world correctness considered too difficult to test. Real-world short-cut considered too weak to be useful

slide-149
SLIDE 149

149

Many Facets of the Test Oracle Problem

Challenge 4:

 Expected outcome = actual execution result

slide-150
SLIDE 150

Ubiquitous Computing

 Computing everywhere and at any time  Applications operate in dynamic environment

150

slide-151
SLIDE 151

Ubiquitous Computing

 Computing everywhere and at any time  Applications operate in dynamic environment  Expected outcome = actual execution result

151

slide-152
SLIDE 152

Ubiquitous Computing

 Computing everywhere and at any time  Applications operate in dynamic environment  Expected outcome = actual execution result  When does a test case end?

152

slide-153
SLIDE 153

Ubiquitous Computing

 Computing everywhere and at any time  Applications operate in dynamic environment  Expected outcome = actual execution result  When does a test case end?

 Middleware remains active and environment context

keeps changing!

153

slide-154
SLIDE 154

Ubiquitous Computing

Expected and Actual Context Trends

 Actual result

50 100 150 200 250 300 350 5 10 15 20 25 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Contextual Value after i-th context update The i-th context update

qd qv ql d

 Expected Result

50 100 150 200 250 300 350 5 10 15 20 25 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Contextual Value after i-th context update The i-th context update qd qv qp d

Any difference?

slide-155
SLIDE 155

 Identify checkpoints where the system is

momentarily stable.

Ubiquitous Computing

 Computing everywhere and at any time  Applications operate in dynamic environment  Expected outcome = actual execution result  When does a test case end?

 Middleware remains active and environment context

keeps changing!

155

slide-156
SLIDE 156

Conclusion

 Many facets of the test oracle problem

156

slide-157
SLIDE 157

Conclusion

 Many facets of the test oracle problem

 Expected outcome = actual execution result

157

Metamorphic testing Many facets of metamorphic testing.

slide-158
SLIDE 158

Conclusion

 Many facets of the test oracle problem

 Expected outcome = actual execution result  Expected outcome = actual execution result

158

Algebraic specifications Many facets of algebraic specifications.

slide-159
SLIDE 159

Conclusion

 Many facets of the test oracle problem

 Expected outcome = actual execution result  Expected outcome = actual execution result  Expected outcome = actual execution result

159

Many facets of ubiquitous computing.

slide-160
SLIDE 160

Conclusion

 Jungle of problems  Jungle of proposals  Empirical studies are just an exploratory first step

rather than the ultimate goal

 Tame the forest rather than trimming individual

trees.

160

slide-161
SLIDE 161

Your Comments are Welcome

slide-162
SLIDE 162

Thank you

slide-163
SLIDE 163

Load the next file please

slide-164
SLIDE 164