Towards Automated Boundary Value Testing with Program Derivatives and Search

A natural and often used strategy when testing software is to use input values at boundaries, i.e. where behavior is expected to change the most, an approach often called boundary value testing or analysis (BVA). Even though this has been a key testing idea for long it has been hard to clearly define and formalize. Consequently, it has also been hard to automate. In this research note we propose one such formalization of BVA by, in a similar way as to how the derivative of a function is defined in mathematics, considering (software) program derivatives. Critical to our definition is the notion of distance between inputs and outputs which we can formalize and then quantify based on ideas from Information theory. However, for our (black-box) approach to be practical one must search for test inputs with specific properties. Coupling it with search-based software engineering is thus required and we discuss how program derivatives can be used as and within fitness functions. This brief note does not allow a deeper, empirical investigation but we use a simple illustrative example throughout to introduce the main ideas. By combining program derivatives with search, we thus propose a practical as well as theoretically interesting technique for automated boundary value (analysis and) testing.

[1]  Ronald de Wolf,et al.  Algorithmic Clustering of Music Based on String Compression , 2004, Computer Music Journal.

[2]  Péter Gács,et al.  Information Distance , 1998, IEEE Trans. Inf. Theory.

[3]  Robert Feldt,et al.  Finding a Boundary between Valid and Invalid Regions of the Input Space , 2018, 2018 25th Asia-Pacific Software Engineering Conference (APSEC).

[4]  Lee J. White,et al.  A Domain Strategy for Computer Program Testing , 1980, IEEE Transactions on Software Engineering.

[5]  Robert M. Hierons Avoiding coincidental correctness in boundary value analysis , 2006, TSEM.

[6]  Michael R. Lyu,et al.  Automatic string test data generation for detecting domain errors , 2009, Softw. Test. Verification Reliab..

[7]  Tony Gorschek,et al.  Searching for Cognitively Diverse Tests: Towards Universal Test Diversity Metrics , 2008, 2008 IEEE International Conference on Software Testing Verification and Validation Workshop.

[8]  Robert Feldt,et al.  Broadening the Search in Search-Based Software Testing: It Need Not Be Evolutionary , 2015, 2015 IEEE/ACM 8th International Workshop on Search-Based Software Testing.

[9]  David Clark,et al.  Test Set Diameter: Quantifying the Diversity of Sets of Test Cases , 2015, 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[10]  David Darais,et al.  Parsing with derivatives: a functional pearl , 2011, ICFP.

[11]  Judy McKay,et al.  The Software Test Engineer's Handbook: A Study Guide for the ISTQB Test Analyst and Technical Analyst Advanced Level Certificates , 2008 .

[12]  Bingchiang Jeng,et al.  An automatic approach of domain test data generation , 1999, J. Syst. Softw..

[13]  Robert Feldt,et al.  Finding test data with specific properties via metaheuristic search , 2013, 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE).

[14]  Ming Li,et al.  Normalized Information Distance , 2008, ArXiv.

[15]  Antonia Bertolino,et al.  Scalable Approaches for Test Suite Reduction , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[16]  Robert L. Glass,et al.  Loyal Opposition - Frequently Forgotten Fundamental Facts about Software Engineering , 2001, IEEE Softw..

[17]  Konstantinos Sagonas,et al.  Targeted property-based testing , 2017, ISSTA.

[18]  Mark Harman,et al.  Augmenting test suites effectiveness by increasing output diversity , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[19]  Lori A. Clarke,et al.  A Close Look at Domain Testing , 1982, IEEE Transactions on Software Engineering.

[20]  Elaine J. Weyuker,et al.  Analyzing Partition Testing Strategies , 1991, IEEE Trans. Software Eng..