Using Logic Criterion Feasibility to Reduce Test Set Size While Guaranteeing Fault Detection Gary Kaminski and Paul Ammann ICST 2009 March 24 Version.

Slides:



Advertisements
Similar presentations
Data Flow Coverage. Reading assignment L. A. Clarke, A. Podgurski, D. J. Richardson and Steven J. Zeil, "A Formal Evaluation of Data Flow Path Selection.
Advertisements

1 Applications of Optimization to Logic Testing Gary Kaminski and Paul Ammann ICST 2010 CSTVA Workshop.
Course Software Testing & Verification 2013/14 Wishnu Prasetya
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
An Evaluation of MC/DC Coverage for Pair-wise Test Cases By David Anderson Software Testing Research Group (STRG)
Software Testing Logic Coverage. Introduction to Software Testing (Ch 3) © Ammann & Offutt 2 Logic Coverage Four Structures for Modeling Software Graphs.
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
14004 L5 - © D. Deugo, Lecture 5 Combinational Models (Binder chapter 6)
Presenter: Jyun-Yan Li Design Fault Directed Test Generation for Microprocessor Validation Deepak A. Mathaikutty, Sandeep K. Shukla FERMAT Lab, Virginia.
Graph Coverage (2).
Practical Approach to Teaching Software Testing Sashko Ristov 11th Workshop on “Software Engineering Education and Reverse Engineering” – August 22-27,
Partial Implications, etc.
Today’s Agenda  HW #1 Due  Quick Review  Finish Input Space Partitioning  Combinatorial Testing Software Testing and Maintenance 1.
ECE 331 – Digital System Design
Introduction to Software Testing Chapter 8.2
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Introduction to Software Testing Chapter 5.2 Program-based Grammars Paul Ammann & Jeff Offutt
Of 33 Improving Logic-Based Testing Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Today’s Agenda  Quick Review  Finish Graph-Based Testing  Predicate Testing Software Testing and Maintenance 1.
Software Logic Mutation Testing Presented by Gary Kaminski.
Introduction to Software Testing Chapter 8.1 Logic Coverage Paul Ammann & Jeff Offutt
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
Software Testing. Software testing is the execution of software with test data from the problem domain. Software testing is the execution of software.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapters 1-5 Coverage Summary Paul Ammann & Jeff Offutt
Introduction to Software Testing Paul Ammann & Jeff Offutt Updated 24-August 2010.
Introduction to Software Testing Chapter 8.1 Logic Coverage Paul Ammann & Jeff Offutt
Using Logic Criterion Feasibility to Reduce Test Set Size While Guaranteeing Double Fault Detection Gary Kaminski and Paul Ammann Software Engineering.
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 9.2 Program-based Grammars Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 3.1 Logic Coverage Paul Ammann & Jeff Offutt.
Introduction to Software Testing Chapter 4 Input Space Partition Testing Paul Ammann & Jeff Offutt
1 Using a Fault Hierarchy to Improve the Efficiency of DNF Logic Mutation Testing Gary Kaminski and Paul Ammann ICST 2009.
Introduction to Software Testing Chapter 3.2 Logic Coverage
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 8.2
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 8.1 Logic Coverage
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Paul Ammann & Jeff Offutt
Introduction to Software Testing Syntactic Logic Coverage Criteria
Coverage-Based Test Design CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Boolean Expressions Lecture No. 10.
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage
Paul Ammann & Jeff Offutt
Logic Coverage CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 5.2 Program-based Grammars
Moonzoo Kim School of Computing KAIST
Introduction to Software Testing Chapter 3.2 Logic Coverage
Logic Coverage CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Logic Coverage Active Clause Coverage CS 4501 / 6501 Software Testing
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Logic Coverage from Source Code
Logic Coverage for Source Code CS 4501 / 6501 Software Testing
[Ammann and Offutt, “Introduction to Software Testing,” Ch. 8]
Introduction to Software Testing Chapter 8.1 Logic Coverage
Introduction to Software Testing Chapter 3.2 Logic Coverage
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage
Presentation transcript:

Using Logic Criterion Feasibility to Reduce Test Set Size While Guaranteeing Fault Detection Gary Kaminski and Paul Ammann ICST 2009 March 24 Version

Motivation Current logic criteria: –generate large test sets (Combinatorial) or –do not guarantee detecting logic faults (RACC) Goal: - generate smaller test sets while still guaranteeing fault detection Assumption: - restrict attention to minimal Disjunctive Normal Form (DNF) Boolean predicates tested in isolation

A Word About Infeasibility Infeasible Test Requirements are a hassle! –They can bloat test sets –They can thwart subsumption hierarchies –Example: RACC and CACC May be infeasible to satisfy RACC, but feasible to satisfy CACC RACC subsumes CACC, yet for a literal in a predicate, CACC may yield a test case when RACC does not Coverage Criteria for Detecting Logic Faults –If all test requirements feasible, simple criteria are enough –More complex criteria needed to fill in the gaps –This paper analyzes feasibility at a “low” level –Result: Minimal, fault-detecting test sets

Building Test Sets Guaranteed to Detect Faults (Current) Predicate P: ab + a!c Test Set = T1 + T2 + T3 Apply Criterion 1 T1 Apply Criterion 2 T2 Apply Criterion 3 T3 Apply Each Criterion to P, Component by Component If criterion feasible on component, generate test If criterion infeasible on component, satisfy as much as possible Result: Tests from all Criteria on all Components Criteria are all necessary; but individual tests may be unnecessary

Analyzing Criterion Feasibility at Component Level Predicate P: ab + a!c Test Set = T1’ + T2’ + T3’ Criterion Feasibility Analyzed, Component by Component If criterion feasible on component, generate test and FINISH If criterion infeasible on component, partially satisfy and go to next criterion Criterion 1 Feasible? Extract Components Apply Criterion 1 T1’ Yes Criterion 2 Feasible? No Apply Criterion 2 Yes T2’ Apply Criterion 3 No T3’ Result: Every resulting test has a reason for being there Note: Some details glossed over in this figure…

Minimal DNF Terms separated by OR, literals by AND ab + a!c vs. a(b + !c) Make each term true and other terms false ab + ac vs. ab + abc Impossible to remove a literal or term without changing the predicate ab vs. abc + ab!c

Minimal DNF Logic Faults Original: ab + bc Literal Insertion Fault: abc + b!c Literal Insertion Fault: ab!c + b!c Literal Reference Fault: ac + b!c Literal Reference Fault: a!c + b!c Literal Omission Fault: b + b!c A test set detecting these faults also detects others

Lau and Yu’s Fault Hierarchy A test set that guarantees detection of a source fault guarantees detection of a destination fault Ignores effect of criterion feasibility LOF ORF. LRF LNF TNF ENF LIF TOF ORF+

Unique True Points and Near False Points UTP: An assignment of values such that only one term evaluates to true. ab + !ac: 110 and 111 are UTPs for ab NFP: An assignment of values such that the predicate evaluates to false but when a literal is omitted, it evaluates to true. ab + !ac: 100 and 101 are NFPs for b

MUTP Criterion Find UTP tests for each term such that all literals not in the term attain 0 and 1. Detects LIF and if feasible, detects LRF Inexpensive to satisfy Feasible for ab + !ac ab – 110, 111 !ac – 001, 011 Infeasible for ab + ac ab – 110

CUTPNFP Criterion Find a UTP - NFP pair such that only the literal of interest changes value. Detects LOF and if feasible, detects LRF More expensive to satisfy Feasible for b in ab + ac UTP for ab is 110 NFP for b in ab is 100 Infeasible for b in first term of ab + b!c + !bc UTP for ab is 111 NFP for b in ab 100 (101 makes !bc true)

MNFP Criterion Find NFP tests for each literal such that all literals not in the term attain 0 and 1. Detects LOF and if feasible, detects LRF Most expensive to satisfy Feasible for a in first term of ab + ac 010, 011 Infeasible for a in first term of ab + !ac 010 (011 makes !ac true)

MUMCUT Criterion Combine CUTPNFP, MNFP, and MUTP - detects LIF, LRF, and LOF but expensive - without considering feasibility need all 3 criteria to detect LRF Other criteria require less inputs but do not guarantee fault detection (RACC) Can we reduce MUMCUT test set size while still guaranteeing LRF detection?

MUTP Feasibility and LRF If MUTP is feasible for a term: Black – Green -MUTP detects LRF -CUTPNFP not needed to detect LRF -MNFP not needed to detect LRF CUTPNFP feasible? MNFP Test Set = MUTP + MNFP For Each Literal In Term Test Set = MUTP + CUTPNFP For Each Term MUTP feasible? Test Set = MUTP + NFP

CUTPNFP Feasibility and LRF If MUTP is infeasible for a term but CUTPNFP is feasible for a literal in the term: Black – Red – Black - Green -MUTP does not detect LRF -CUTPNFP detects LRF -MNFP not needed to detect LRF Test Set = MUTP + NFP MNFP Test Set = MUTP + MNFP For Each Term MUTP feasible? CUTPNFP feasible? For Each Literal In Term Test Set = MUTP + CUTPNFP

MNFP Feasibility and LRF If MUTP is infeasible for a term and CUTPNFP is infeasible for a literal in the term: Black – Red – Black – Red – Black -MUTP does not detect LRF -CUTPNFP does not detect LRF -MNFP will detect LRF For Each Term MUTP feasible? CUTPNFP feasible? MNFP Test Set = MUTP + MNFP For Each Literal In Term Test Set = MUTP + NFP Test Set = MUTP + CUTPNFP

Minimal-MUMCUT Criterion MUTP feasible  MUTP detects LRF CUTPNFP feasible  CUTPNFP detects LRF Both infeasible  MNFP detects LRF Minimal-MUMCUT: Always need MUTP tests to detect LIF CUTPNFP tests only when MUTP infeasible MNFP tests only when both are infeasible “Minimal” means that every test in the test set is needed to guarantee fault detection – not minimized

New Fault Hierarchy Black arrow: relation always holds Green arrow: relation holds if MUTP is feasible Red arrow: relation holds if MUTP is infeasible and CUTPNFP is feasible LOF ORF. LRF LNF TNF ENF LIF TOF ORF+

Case Study Analyzed 19 Boolean predicates in an avionics software system (Weyuker, Chen, Lau, and Yu) Number of unique literals range: 5 to 13 Determined MUTP feasibility for each term and CUTPNFP feasibility for each literal Examined test set size for MUMCUT vs. Minimal-MUMCUT

Case Study Results Minimal-MUMCUT size is 12% of MUMCUT size Savings in test set size comes from 1) CUTPNFP feasible for all 853 literals: no MNFP 2) For 24% of literals, MUTP detects LRF: no CUTPNFP 3) 16 of 19 predicates had a MUTP feasible term

Test Set Size vs. Number of Unique Literals

Conclusion Used criterion feasibility to reduce test set size without sacrificing fault detection Modification of fault detection relations in Lau and Yu’s hierarchy based on criterion feasibility Introduction of the Minimal-MUMCUT criterion based on minimal DNF Applications for software testing of programs with large predicates