CSC 509 Lecture Notes Week 9
Research in Testing Tools and Techniques
requires only one test case to fulfill statement testing.if ((a < b) or (c >= d)) and ((e == f) or (g <= h)) x := (y + z) * 10;
Specification-Based Testing with ADL
ADL Construct RSL/Java Construct
module .h file type constituent class (type) definition object constituent var or const declaration function constituent function declaration binding not used (could be a macro or RSL let) assertion and'd clause in postcondition exception precondition converted precondition (see below) @ (call-state operator) complement of prime notation (see below) --> (implication) ?,: (C if-then-else expression)
void Append(List* l, Elem* e) /* * pre: !(l->Find(e)) * post: l->Find(e) */
int Append(List* l, Elem* e) /* * pre: * post: !(l->Find(e)) * ? (return == -1) * : (l->Find(e) && (return == 1) */
a | b | a || b |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
a | b | a || b | test |
condition | |||
0 | 0 | 0 | a==0, b==0 |
0 | 1 | 1 | a==0, b==1 |
1 | 0 | 1 | a==1 |
1 | 1 | 1 | covered by a==1 |
a | b | a -> b | test |
condition | |||
0 | 0 | 1 | a==0 |
0 | 1 | 1 | covered by a==0 |
1 | 0 | 0 | a==1, b==0 |
1 | 1 | 1 | a==1, b==1 |
a | b | a && b | test |
condition | |||
0 | 0 | 0 | a==0 |
0 | 1 | 0 | covered by a==0 |
1 | 0 | 0 | a==1, b==0 |
1 | 1 | 1 | a==1, b==1 |
x < 0 | x > 10 | (x < 0) || (x > 10) | test | test |
condition | data | |||
0 | 0 | 0 | !(x < 0) && !(x > 10) | x = 5 |
0 | 1 | 1 | x > 10 | x = 11 |
1 | 0 | 1 | x < 0 | x = -1 |
1 | 1 | ---- impossible ---- |
The Meaningful Impact Strategy for Automatically Generating Test Data from a Boolean Specification
abcd + abcd + abcd + abcd + abcd