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-Adequacy Assessment Using Program Mutation
Mutant M2 of Program P7.2
1 enum dangerLevel {none, moderate, high, veryHigh}d;
2 procedure checkTemp (currentTemp, maxTemp){
3 oat currentTemp[3], maxTemp; int highCount=0;
4 enum dangerLevel danger;
5 danger =none;
6 if (currentTemp[0]>maxTemp)
7 highCount=1;
8 if (currentTemp[1]>maxTemp)
9 highCount=highCount+1;
10 if (currentTemp[2])>maxTemp)
11 highCount=highCount+1;
12 if (highCount 1) danger=moderate; Mutated statement
13 if (highCount==2) danger=high;
14 if (highCount==3) danger=veryHigh;
15 return(danger);
16 }
It is easy to check that for all triples of input temperature values and
the maximum allowa ...
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