1
Metamorphic Testing: A Simple Method for Testing Non-Testable Programs
Tsong Yueh Chen
tychen@swin.edu.au Swinburne University of Technology Australia
Metamorphic Testing: A Simple Method for Testing Non-Testable - - PowerPoint PPT Presentation
Metamorphic Testing: A Simple Method for Testing Non-Testable Programs Tsong Yueh Chen tychen@swin.edu.au Swinburne University of Technology Australia 1 Test Oracle A mechanism or procedure against which the computed outputs could be
1
Tsong Yueh Chen
tychen@swin.edu.au Swinburne University of Technology Australia
2
3
4
5
6
7
8
9
10
11
12
13
14
15
If programs P and P’ are equivalent with respect to input I, then their object codes are equivalent with respect to I. http://blog.regehr.org.archives/1161
16
17
DAT –an Experience Report, M. Lindvall, D. Ganesan, R. Ardal and R. E. Wiegand, ICSE 2015, 129-138.
Software, C. E. Otero and A. Peter, IEEE Intelligent Systems, 14-19, January/February 2015.
Metamorphic Testing, A. Nunez and R. M. Hierons, Annals of Telecommunications, Vol. 70(3), 127-135, 2015.
18
19
20
1 2 3 4 5 6
: TS t t t t t t
1 2 3 4 5 6
1 1 1 1 1 1 1 1 1 1 : : 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 s s s P MS s s s
: RE p p p p f f
21
1 2 3 4 5 6
: TS t t t t t t
1 2 3 4 5 6
1 1 1 1 1 1 1 1 1 1 : : 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 s s s P MS s s s
: RE p p p p f f
:
i i i i i ef ep nf np
A a a a a
2 4 3 2 1 1 2 3 : 1 3 1 1 2 3 1 2 4 MA
22
( ) / ( )
i i i ef ef ep T i i i i i i i ef nf ef nf ep np
a a a R s a a a a a a
1 2 4 1 2 5 7 2
1 2 3 4 5 6
s s s s s s
5 4 1 6 2 3
s s s s s s
23
24
25
26
1 2 3 4 5 6
: MTS g g g g g g
1 2 3 4 5 6
1 1 1 1 1 1 1 1 1 1 1 : : 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 s s s P MS s s s
: RE n v n n v v
27
1 2 3 4 5 6
: MTS g g g g g g
1 2 3 4 5 6
1 1 1 1 1 1 1 1 1 1 1 : : 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 s s s P MS s s s
: RE n v n n v v
:
i i i i i ef ep nf np
A a a a a
3 3 1 3 2 1 3 2 : 2 3 1 3 2 1 3 3 MA
28
( ) / ( )
i i i ef ef ep T i i i i i i i ef nf ef nf ep np
a a a R s a a a a a a
1 1 2 3 1 2 4 5 5 2
1 2 3 4 5 6
s s s s s s
5 1 6 4 2 3
s s s s s s
29
30
31
Metamorphic Testing, A. Nunez and R. M. Hierons, Annals of Telecommunications, Vol. 70(3), 127-135, 2015.
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
A B
48
49
50
x f(x) f(x) = axn + bxn-1 + …
51
x f(x)
52
53
54
55
56
57
58
59
60
61
62
63
TR-01, University of Seville, 2015.