PBCOV: a property-based coverage criterion

Coverage criteria aim at satisfying test requirements and compute metrics values that quantify the adequacy of test suites at revealing defects in programs. Typically, a test requirement is a structural program element, and the coverage metric value represents the percentage of elements covered by a test suite. Empirical studies show that existing criteria might characterize a test suite as highly adequate, while it does not actually reveal some of the existing defects. In other words, existing structural coverage criteria are not always sensitive to the presence of defects. This paper presents PBCOV, a Property-Based COVerage criterion, and empirically demonstrates its effectiveness. Given a program with properties therein, static analysis techniques, such as model checking, leverage formal properties to find defects. PBCOV is a dynamic analysis technique that also leverages properties and is characterized by the following: (a) It considers the state space of first-order logic properties as the test requirements to be covered; (b) it uses logic synthesis to compute the state space; and (c) it is practical, i.e., computable, because it considers an over-approximation of the reachable state space using a cut-based abstraction.We evaluated PBCOV using programs with test suites comprising passing and failing test cases. First, we computed metrics values for PBCOV and structural coverage using the full test suites. Second, in order to quantify the sensitivity of the metrics to the absence of failing test cases, we computed the values for all considered metrics using only the passing test cases. In most cases, the structural metrics exhibited little or no decrease in their values, while PBCOV showed a considerable decrease. This suggests that PBCOV is more sensitive to the absence of failing test cases, i.e., it is more effective at characterizing test suite adequacy to detect defects, and at revealing deficiencies in test suites.

[1]  Sanjai Rayadurgam,et al.  Auto-generating Test Sequences Using Model Checkers: A Case Study , 2003, FATES.

[2]  Koushik Sen,et al.  Heuristics for Scalable Dynamic Test Generation , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[3]  Paul Ammann,et al.  A specification-based coverage metric to evaluate test sets , 1999, Proceedings 4th IEEE International Symposium on High-Assurance Systems Engineering.

[4]  Todd Millstein,et al.  Automatic predicate abstraction of C programs , 2001, PLDI '01.

[5]  Richard M. Stallman,et al.  An Introduction to GCC , 2004 .

[6]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[7]  Michael D. Ernst,et al.  Improving test suites via operational abstraction , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[8]  Debra J. Richardson,et al.  Structural specification-based testing: automated support and experimental evaluation , 1999, ESEC/FSE-7.

[9]  Andreas Zeller,et al.  Assessing Oracle Quality with Checked Coverage , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[10]  Carl K. Chang,et al.  GenRed: A Tool for Generating and Reducing Object-Oriented Test Cases , 2010, 2010 IEEE 34th Annual Computer Software and Applications Conference.

[11]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[12]  Carlo Ghezzi,et al.  Using symbolic execution for verifying safety-critical systems , 2001, ESEC/FSE-9.

[13]  David Evans,et al.  Dynamically inferring temporal properties , 2004, PASTE.

[14]  Sarfraz Khurshid,et al.  Test generation through programming in UDITA , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[15]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[16]  Peter Linz,et al.  An Introduction to Formal Languages and Automata , 1997 .

[17]  Joseph Robert Horgan,et al.  Data flow coverage and the C language , 1991, TAV4.

[18]  Peter Linz,et al.  An Introduction to Formal Languages and Automata , 2011 .

[19]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[20]  Elaine J. Weyuker,et al.  Data flow analysis techniques for test data selection , 2015, ICSE '82.

[21]  Thomas Ball,et al.  A Theory of Predicate-Complete Test Coverage and Generation , 2004, FMCO.

[22]  Xuejun Yang,et al.  Slicing Execution with Partial Weakest Precondition for Model Abstraction of C Programs , 2010, Comput. J..

[23]  Bruno Dutertre,et al.  A Fast Linear-Arithmetic Solver for DPLL(T) , 2006, CAV.

[24]  S. Rajamani,et al.  A decade of software model checking with SLAM , 2011, Commun. ACM.

[25]  Yannick Moy,et al.  ACSL: ANSI C Specification Language , 2008 .

[26]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[27]  Adam Barr,et al.  Find the Bug: A Book of Incorrect Programs , 2004 .

[28]  Wes Masri,et al.  Cleansing Test Suites from Coincidental Correctness to Enhance Fault-Localization , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[29]  A. Jefferson Offutt,et al.  Book review: Introduction to Software Testing written by Paul Amman & Jeff Offutt. and published by CUP, 2008, 978-0-521-88038 322 pp., 0-471-20282-7 , 2008, SOEN.

[30]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[31]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.

[32]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[33]  Anna Philippou,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2018, Lecture Notes in Computer Science.

[34]  David Leon,et al.  An Empirical Study of Test Case Filtering Techniques Based on Exercising Information Flows , 2007, IEEE Transactions on Software Engineering.

[35]  Luciano Baresi,et al.  An Introduction to Software Testing , 2006, FoVMT.

[36]  Alessandro Orso,et al.  Test-Suite Augmentation for Evolving Software , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[37]  D. R. Fulkerson,et al.  Maximal Flow Through a Network , 1956 .

[38]  Emina Torlak,et al.  Kodkod: A Relational Model Finder , 2007, TACAS.

[39]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[40]  Daniel Kroening,et al.  A Tool for Checking ANSI-C Programs , 2004, TACAS.

[41]  Sarfraz Khurshid,et al.  TestEra: Specification-Based Testing of Java Programs Using SAT , 2004, Automated Software Engineering.

[42]  Wes Masri,et al.  Property based coverage criterion , 2009, DEFECTS '09.

[43]  Stephan Merz,et al.  Model Checking , 2000 .

[44]  Gregg Rothermel,et al.  Supporting Controlled Experimentation with Testing Techniques: An Infrastructure and its Potential Impact , 2005, Empirical Software Engineering.