Skip to Main Content
Foundations of Software Testing: Fundamental Algorithms and Techniques
book

Foundations of Software Testing: Fundamental Algorithms and Techniques

by Aditya P. Mathur
March 2007
Intermediate to advanced content levelIntermediate to advanced
709 pages
20h 23m
English
Pearson India
Content preview from Foundations of Software Testing: Fundamental Algorithms and Techniques
Test Generation
Program P5.3
1 main(){
2 int x,y,z; Replaced by
int x, y; oat z;
3 z=0;
4 input (x, y);
5 if(x<y)
6 {z-x+y; output(z);}
7 output ((oat) (x-y));
8 end
9}
t
Start
1
2
3
f
End
main
3, 4, 5
6
7
8, 9
1, 2
use(1)={ x, y }
use(2)={ x, y, z }
use(3)={ x, y }
Lines
Fig. 5.8 Program and its CFG for Example 5.11.
z is changed from int to oat. We refer to the original and the
modified programs as P and P
, respectively. It is easy to see that
gdeclChange =∅and declChange
mai n
= {z}. Suppose the following
test set is used for testing P:
T =
t
1
:< x = 1, y = 3 >
t
2
:< x = 2, y = 1 >
t
3
:< x = 3, y = 4 >
We can easily trace CFG(P) for each test case to find the test vectors ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson

Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson

Aditya P. Mathur
Fundamentals of Computer Programming and IT by Pearson

Fundamentals of Computer Programming and IT by Pearson

Ashok Namdev Kamthane, Rohit Khurana

Publisher Resources

ISBN: 9788131707951