Metamorphic Runtime Checking of Non-Testable Programs

Challenges arise in assuring the quality of applications that do not have test oracles, i.e., for which it is difficult or impossible to know what the correct output should be for arbitrary input. Recently, metamorphic testing [7] has been shown to be a simple yet effective technique in addressing the quality assurance of these so-called “non-testable programs” [51]. In metamorphic testing, existing test case input is modified to produce new test cases in such a manner that, when given the new input, the function should produce an output that can easily be computed based on the original output. That is, if input x produces output f (x), then we create input x’ such that we can predict f (x’ ) based on f (x); if the application does not produce the expected output, then a defect must exist, and either f (x) or f (x’ ) (or both) is wrong. Previously we have presented an approach called “Automated Metamorphic System Testing” [37], in which metamorphic testing is conducted automatically as the program executes. In the approach, metamorphic properties of the entire application are specified, and then checked after execution is complete. Here, we improve upon that work by presenting a technique in which the metamorphic properties of individual functions are used, allowing for the specification of more complex properties and enabling finer-grained runtime checking. Our goal is to demonstrate that such an approach will be more effective than one based on specifying metamorphic properties at the system level, and is also feasible for use in the deployment environment. This technique, called Metamorphic Runtime Checking, is a system testing approach in which the metamorphic properties of individual functions are automatically checked during the program’s execution. The tester is able to easily specify the functions’ properties so that metamorphic testing can be conducted in a running application, allowing the tests to execute using real input data and in the context of real system states, without affecting those states. We also describe an implementation framework called Columbus, and present the results of empirical studies that demonstrate that checking Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. FSE 2009 Amsterdam, The Netherlands Copyright 200X ACM X-XXXXX-XX-X/XX/XX ...$5.00. the metamorphic properties of individual functions increases the effectiveness of the approach in detecting defects, with minimal performance impact.

[1]  Catherine Blake,et al.  UCI Repository of machine learning databases , 1998 .

[2]  David S. Rosenblum A Practical Approach to Programming With Assertions , 1995, IEEE Trans. Software Eng..

[3]  David Coppit,et al.  On the Use of Specification-Based Assertions as Test Oracles , 2005, 29th Annual IEEE/NASA Software Engineering Workshop.

[4]  Giovanni Denaro,et al.  Self-Test Components for Highly Reconfigurable Systems , 2003, TACoS.

[5]  Raymond McLeod,et al.  Software Testing: Testing Across the Entire Software Development Life Cycle , 2007 .

[6]  Angelos Stavrou,et al.  From STEM to SEAD: Speculative Execution for Automated Defense , 2007, USENIX Annual Technical Conference.

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

[8]  Gerald W. Evans,et al.  A simulation model for evaluating personnel schedules in a hospital emergency department , 1996, Winter Simulation Conference.

[9]  Yingxu Wang,et al.  On built-in test reuse in object-oriented framework design , 2000, CSUR.

[10]  References , 1971 .

[11]  Gail E. Kaiser,et al.  Empirical Evaluation of Approaches to Testing Applications without Test Oracles , 2010 .

[12]  William M. Waite,et al.  Software manual for the elementary functions , 1980 .

[13]  Gail E. Kaiser,et al.  Properties of Machine Learning Applications for Use in Metamorphic Testing , 2008, SEKE.

[14]  Michal Young,et al.  Residual test coverage monitoring , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[15]  T. H. Tse,et al.  An empirical comparison between direct and indirect test result checking approaches , 2006, SOQUA '06.

[16]  Chengying Mao,et al.  AOP-based Testability Improvement for Component-based Software , 2007, 31st Annual International Computer Software and Applications Conference (COMPSAC 2007).

[17]  Nancy G. Leveson,et al.  The Use of Self Checks and Voting in Software Error Detection: An Empirical Study , 1990, IEEE Trans. Software Eng..

[18]  Colin Atkinson,et al.  Ubiquitous RATs: how resource-aware run-time tests can improve ubiquitous software systems , 2006, SEM '06.

[19]  Amer Diwan,et al.  Discovering Algebraic Specifications from Java Classes , 2003, ECOOP.

[20]  David S. Rosenblum,et al.  A historical perspective on runtime assertion checking in software development , 2006, SOEN.

[21]  Myra B. Cohen,et al.  Testing across configurations: implications for combinatorial testing , 2006, SOEN.

[22]  Tsong Yueh Chen,et al.  Semi-proving: an integrated method based on global symbolic evaluation and metamorphic testing , 2002, ISSTA '02.

[23]  Michael I. Jordan,et al.  Bug isolation via remote program sampling , 2003, PLDI '03.

[24]  Ian H. Witten,et al.  Data mining: practical machine learning tools and techniques, 3rd Edition , 1999 .

[25]  João Abreu,et al.  Checking the Conformance of Java Classes Against Algebraic Specifications , 2006, ICFEM.

[26]  Johannes Mayer,et al.  An Empirical Study on the Selection of Good Metamorphic Relations , 2006, 30th Annual International Computer Software and Applications Conference (COMPSAC'06).

[27]  Manuel Blum,et al.  Designing programs that check their work , 1989, STOC '89.

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

[29]  Gail E. Kaiser,et al.  Automatic system testing of programs without test oracles , 2009, ISSTA.

[30]  Simeon C. Ntafos,et al.  An Evaluation of Random Testing , 1984, IEEE Transactions on Software Engineering.

[31]  Zhendong Su,et al.  Scalable detection of semantic clones , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[32]  Colin Atkinson,et al.  Reducing verification effort in component-based software engineering through built-in testing , 2006, 2006 10th IEEE International Enterprise Distributed Object Computing Conference (EDOC'06).

[33]  Christopher Krügel,et al.  Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications , 2008, 2008 IEEE Symposium on Security and Privacy (sp 2008).

[34]  Sebastian G. Elbaum,et al.  An empirical study of profiling strategies for released software and their impact on testing activities , 2004, ISSTA '04.

[35]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[36]  Leonardo Mariani,et al.  Generation of Integration Tests for Self-Testing Components , 2004, FORTE Workshops.

[37]  Salvatore J. Stolfo,et al.  Anomalous Payload-Based Network Intrusion Detection , 2004, RAID.

[38]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[39]  Vladimir N. Vapnik,et al.  The Nature of Statistical Learning Theory , 2000, Statistics for Engineering and Information Science.

[40]  John R. Anderson,et al.  MACHINE LEARNING An Artificial Intelligence Approach , 2009 .

[41]  Alberto Maria Segre,et al.  Programs for Machine Learning , 1994 .

[42]  Antonia Bertolino,et al.  Software Testing Research: Achievements, Challenges, Dreams , 2007, Future of Software Engineering (FOSE '07).

[43]  Volker Gruhn,et al.  The Self-Testing COTS Components ( STECC ) Strategy – a new form of improving component testability ∗ , 2003 .

[44]  Gail E. Kaiser,et al.  Improving the Dependability of Machine Learning Applications , 2008 .

[45]  Chang Liu,et al.  Software Components with Retrospectors , 1998 .

[46]  Lionel C. Briand Novel Applications of Machine Learning in Software Testing , 2008, 2008 The Eighth International Conference on Quality Software.

[47]  Suzanne M. Embury,et al.  An intensional approach to the specification of test cases for database applications , 2006, ICSE '06.

[48]  Sudheendra Hangal,et al.  Tracking down software bugs using automatic anomaly detection , 2002, ICSE '02.

[49]  Chang Liu,et al.  RAIC: Architecting Dependable Systems through Redundancy and Just-In-Time Testing , 2002 .

[50]  Bharat B. Madan,et al.  A method for modeling and quantifying the security attributes of intrusion tolerant systems , 2004, Perform. Evaluation.

[51]  Biswanath Mukherjee,et al.  A Methodology for Testing Intrusion Detection Systems , 1996, IEEE Trans. Software Eng..

[52]  Alessandro Orso,et al.  Leveraging field data for impact analysis and regression testing , 2003, ESEC/FSE-11.

[53]  Vladimir Vapnik,et al.  The Nature of Statistical Learning , 1995 .

[54]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[55]  R. A. Leibler,et al.  On Information and Sufficiency , 1951 .

[56]  M. Young Test Oracles , 2001 .

[57]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[58]  Jeffrey J. P. Tsai,et al.  Machine Learning and Software Engineering , 2004, Software Quality Journal.

[59]  S. S. Yau,et al.  Design of self-checking software , 1975 .

[60]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[61]  W. Chan,et al.  A Metamorphic Testing Approach for Online Testing of Service-Oriented Software Applications , 2007, Int. J. Web Serv. Res..

[62]  Jason Nieh,et al.  Proceedings of the 5th Symposium on Operating Systems Design and Implementation , 2022 .

[63]  Martin Rinard,et al.  Automatic Data Structure Repair for Self-Healing Systems , 2003 .

[64]  Rocco A. Servedio,et al.  Martingale Boosting , 2005, COLT.

[65]  Leon J. Osterweil,et al.  Little-JIL/Juliette: a process definition language and interpreter , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[66]  Douglas C. Schmidt,et al.  Skoll: distributed continuous quality assurance , 2004, Proceedings. 26th International Conference on Software Engineering.

[67]  Chengying Mao,et al.  Regression testing for component-based software via built-in test design , 2007, SAC '07.

[68]  Johannes Mayer,et al.  Statistical Metamorphic Testing Testing Programs with Random Output by Means of Statistical Hypothesis Tests and Metamorphic Testing , 2007, Seventh International Conference on Quality Software (QSIC 2007).

[69]  J. Hanley,et al.  The meaning and use of the area under a receiver operating characteristic (ROC) curve. , 1982, Radiology.

[70]  Richard P. Lippmann,et al.  An Overview of Issues in Testing Intrusion Detection Systems , 2003 .

[71]  Nancy G. Leveson,et al.  An experimental evaluation of the assumption of independence in multiversion programming , 1986, IEEE Transactions on Software Engineering.

[72]  Lori A. Clarke,et al.  Simulating patient flow through an Emergency Department using process-driven discrete event simulation , 2009, 2009 ICSE Workshop on Software Engineering in Health Care.

[73]  Albert L. Baker,et al.  Preliminary design of JML: a behavioral interface specification language for java , 2006, SOEN.

[74]  Sriram Sankar,et al.  ADL—an interface definition language for specifying and testing software , 1994 .

[75]  Tsong Yueh Chen,et al.  Case studies on the selection of useful relations in metamorphic testing , 2004 .

[76]  Jungsoon P. Yoo,et al.  Software testing: a machine learning experiment , 1995, CSC '95.

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

[78]  Gail E. Kaiser,et al.  A Runtime Adaptation Framework for Native C and Bytecode Applications , 2006, 2006 IEEE International Conference on Autonomic Computing.

[79]  John C. Platt,et al.  Fast training of support vector machines using sequential minimal optimization, advances in kernel methods , 1999 .

[80]  Suzanne M. Embury,et al.  A safe regression test selection technique for database-driven applications , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[81]  Tsong Yueh Chen,et al.  Fault-based testing without the need of oracles , 2003, Inf. Softw. Technol..

[82]  Jean-Raymond Abrial The specification language Z , 1980 .

[83]  Blaz Zupan,et al.  Orange: From Experimental Machine Learning to Interactive Data Mining , 2004, PKDD.

[84]  Sami Beydeda Research in testing COTS components - built-in testing approaches , 2005, The 3rd ACS/IEEE International Conference onComputer Systems and Applications, 2005..

[85]  David C. Luckham,et al.  An Overview of Anna, a Specification Language for Ada , 1985, IEEE Software.

[86]  Sriram Sankar,et al.  Software Testing Using Algebraic Specification Based Test Oracles , 1993 .

[87]  Sami Beydeda Self-Metamorphic-Testing Components , 2006, 30th Annual International Computer Software and Applications Conference (COMPSAC'06).

[88]  Baowen Xu,et al.  Application of Metamorphic Testing to Supervised Classifiers , 2009, 2009 Ninth International Conference on Quality Software.

[89]  J. Ross Quinlan,et al.  C4.5: Programs for Machine Learning , 1992 .

[90]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[91]  Philip M. Long,et al.  Predicting Electricity Distribution Feeder Failures Using Machine Learning Susceptibility Analysis , 2006, AAAI.

[92]  Jean-Marc Jézéquel,et al.  Increase software trustability with self-testable classes in Java , 2001, Proceedings 2001 Australian Software Engineering Conference.

[93]  Arnaud Gotlieb,et al.  Automated metamorphic testing , 2003, Proceedings 27th Annual International Computer Software and Applications Conference. COMPAC 2003.

[94]  Sergey Brin,et al.  The Anatomy of a Large-Scale Hypertextual Web Search Engine , 1998, Comput. Networks.

[95]  Gail E. Kaiser,et al.  Using JML Runtime Assertion Checking to Automate Metamorphic Testing in Applications without Test Oracles , 2009, 2009 International Conference on Software Testing Verification and Validation.

[96]  Gail E. Kaiser,et al.  Quality Assurance of Software Applications Using the In Vivo Testing Approach , 2009, 2009 International Conference on Software Testing Verification and Validation.

[97]  Sriram Sankar Run-time consistency checking of algebraic specifications , 1991, TAV4.