Search-based failure discovery using testability transformations to generate pseudo-oracles

Testability transformations are source-to-source program transformations that are designed to improve the testability of a program. This paper introduces a novel approach in which transformations are used to improve testability of a program by generating a pseudo-oracle. A pseudo-oracle is an alternative version of a program under test whose output can be compared with the original. Differences in output between the two programs may indicate a fault in the original program. Two transformations are presented. The first can highlight numerical inaccuracies in programs and cumulative roundoff errors, whilst the second may detect the presence of race conditions in multi-threaded code. Once a pseudo-oracle is generated, techniques are applied from the field of search-based testing to automatically find differences in output between the two versions of the program. The results of an experimental study presented in the paper show that both random testing and genetic algorithms are capable of utilizing the pseudo-oracles to automatically find program failures. Using genetic algorithms it is possible to explicitly maximize the discrepancies between the original programs and their pseudo-oracles. This allows for the production of test cases where the observable failure is highly pronounced, enabling the tester to establish the seriousness of the underlying fault.

[1]  Mark Harman,et al.  Testability Transformation - Program Transformation to Improve Testability , 2008, Formal Methods and Testing.

[2]  Zongyuan Yang,et al.  Metamorphic Testing and Its Applications , 2004 .

[3]  Y. L. Traon,et al.  From genetic to bacteriological algorithms for mutation‐based testing , 2005, Softw. Test. Verification Reliab..

[4]  Lionel C. Briand,et al.  Stress testing real-time systems with genetic algorithms , 2005, GECCO '05.

[5]  Mary Lou Soffa,et al.  TimeAware test suite prioritization , 2006, ISSTA '06.

[6]  Oliver Buehler,et al.  Evolutionary Functional Testing of an Automated Parking System , 2003 .

[7]  Mark Harman,et al.  Testability transformation , 2004, IEEE Transactions on Software Engineering.

[8]  Mark Harman,et al.  A Theoretical and Empirical Study of Search-Based Testing: Local, Global, and Hybrid Search , 2010, IEEE Transactions on Software Engineering.

[9]  Darko Marinov,et al.  Automated testing of refactoring engines , 2007, ESEC-FSE '07.

[10]  Mark Harman,et al.  Empirical evaluation of a nesting testability transformation for evolutionary testing , 2009, TSEM.

[11]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[12]  Algirdas Avizienis,et al.  The N-Version Approach to Fault-Tolerant Software , 1985, IEEE Transactions on Software Engineering.

[13]  Mark Dowson,et al.  The Ariane 5 software failure , 1997, SOEN.

[14]  Scott Oaks,et al.  Java Threads , 1997 .

[15]  Roy P. Pargas,et al.  Test‐data generation using genetic algorithms , 1999, Softw. Test. Verification Reliab..

[16]  Mark Harman,et al.  Improving Evolutionary Testing By Flag Removal , 2002, GECCO.

[17]  Phil McMinn Co-testability Transformation , 2008, Evolutionary Test Generation.

[18]  Mark Harman,et al.  Open Problems in Testability Transformation , 2008, 2008 IEEE International Conference on Software Testing Verification and Validation Workshop.

[19]  Mark Harman,et al.  Testability Transformation for Efficient Automated Test Data Search in the Presence of Nesting , 2005 .

[20]  Jean-Marc Jézéquel,et al.  From genetic to bacteriological algorithms for mutation-based testing: Research Articles , 2005 .

[21]  Mark Harman,et al.  Automated Unique Input Output Sequence Generation for Conformance Testing of FSMs , 2006, Comput. J..

[22]  A. J. Offutt A practical system for mutation testing: help for the common programmer , 1994, Proceedings., International Test Conference.

[23]  HarmanMark,et al.  A Theoretical and Empirical Study of Search-Based Testing , 2010 .

[24]  Mark Harman,et al.  Pareto efficient multi-objective test case selection , 2007, ISSTA '07.

[25]  Elaine J. Weyuker,et al.  Pseudo-oracles for non-testable programs , 1981, ACM '81.

[26]  Mark Harman,et al.  A theoretical & empirical analysis of evolutionary testing and hill climbing for structural test data generation , 2007, ISSTA '07.

[27]  John A. Clark,et al.  Automated test‐data generation for exception conditions , 2000 .

[28]  Mark Harman,et al.  Search Algorithms for Regression Test Case Prioritization , 2007, IEEE Transactions on Software Engineering.

[29]  R. Gupta,et al.  Data dependence based testability transformation in automated test generation , 2005, 16th IEEE International Symposium on Software Reliability Engineering (ISSRE'05).

[30]  David L. Spooner,et al.  Automatic Generation of Floating-Point Test Data , 1976, IEEE Transactions on Software Engineering.

[31]  Gary McGraw,et al.  Generating Software Test Data by Evolution , 2001, IEEE Trans. Software Eng..

[32]  Mark Harman,et al.  Constructing Subtle Faults Using Higher Order Mutation Testing , 2008, 2008 Eighth IEEE International Working Conference on Source Code Analysis and Manipulation.

[33]  Mark Harman,et al.  The species per path approach to SearchBased test data generation , 2006, ISSTA '06.

[34]  Joachim Wegener,et al.  Evolutionary test environment for automatic structural testing , 2001, Inf. Softw. Technol..

[35]  Myra B. Cohen,et al.  Constructing test suites for interaction testing , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[36]  Robert Sedgewick,et al.  Introduction to Programming in Java - An Interdisciplinary Approach (Pearson New International Edition) , 2008 .

[37]  Paolo Tonella,et al.  Evolutionary testing of classes , 2004, ISSTA '04.

[38]  A. Jefferson Offutt,et al.  Automatically detecting equivalent mutants and infeasible paths , 1997 .

[39]  Phil McMinn,et al.  Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[40]  Elaine J. Weyuker,et al.  On Testing Non-Testable Programs , 1982, Comput. J..

[41]  Joachim Wegener,et al.  A Comparison of Static Analysis and Evolutionary Testing for the Verification of Timing Constraints , 2004, Real-Time Systems.