Validating class integration test order generation systems with Metamorphic Testing

Abstract Context: Previous studies proposed different kinds of approaches for class integration test order generation, and corresponding systems can be implemented based on these approaches. Such class integration test order generation systems can facilitate the process of software integration testing if they are implemented correctly. Objective: However, a test oracle problem exists in the class integration test order generation systems. Since these approaches for class integration test order generation normally deliver a local optimum rather than a global optimum, there are no practically feasible ways to validate their generated class integration test orders, that is, these implementation systems are untestable. Method: To address the test oracle problem, we apply Metamorphic Testing (MT) to validate class integration test order generation systems. Metamorphic Relations (MRs), which are the key components of MT, reason about relations between test outputs of a system. Five effective MRs are developed to ensure the quality of the class integration test order generation systems. In these proposed MRs, follow-up test inputs are generated by modifying classes or class dependencies in the source test inputs while some characteristics of the source test outputs are preserved, for example, the same class integration test order or the equal stubbing cost. Faults can be detected in systems if an individual MR is violated for certain tests. Results: Failure detection of MT has been successfully demonstrated in empirical experiments on three systems implementing different typical class integration test order generation approaches. More than 84% of faulty programs can be detected by all MRs, for three class integration test order generation systems under investigation. Conclusion: The experimental results show that the proposed MRs are able to systematically and effectively detect faults in class integration test order generation systems. This study explores a new application domain in MT and further extends its applications in Software Engineering.

[1]  A. Ramanathan,et al.  Verification of Compartmental Epidemiological Models Using Metamorphic Testing, Model Checking and Visual Analytics , 2012, 2012 ASE/IEEE International Conference on BioMedical Computing (BioMedCom).

[2]  Sergio Segura,et al.  A Survey on Metamorphic Testing , 2016, IEEE Transactions on Software Engineering.

[3]  A. Jefferson Offutt,et al.  Using Coupling-Based Weights for the Class Integration and Test Order Problem , 2009, Comput. J..

[4]  Raghu Kacker,et al.  Systematic Testing of Post-Quantum Cryptographic Implementations Using Metamorphic Testing , 2019, 2019 IEEE/ACM 4th International Workshop on Metamorphic Testing (MET).

[5]  Sangeeta Sabharwal,et al.  An investigation of strategies for finding test order during Integration testing of object Oriented applications , 2009, 2009 Proceeding of International Conference on Methods and Models in Computer Science (ICM2CS).

[6]  David Chenho Kung,et al.  A test strategy for object-oriented programs , 1995, Proceedings Nineteenth Annual International Computer Software and Applications Conference (COMPSAC'95).

[7]  Huai Liu,et al.  How Effectively Does Metamorphic Testing Alleviate the Oracle Problem? , 2014, IEEE Transactions on Software Engineering.

[8]  Jeffrey M. Voas,et al.  Metamorphic Testing for Cybersecurity , 2016, Computer.

[9]  Nor Laily Hashim,et al.  Test order for class-based integration testing of Java applications , 2005, Fifth International Conference on Quality Software (QSIC'05).

[10]  D. Richard Kuhn,et al.  Finding Bugs in Cryptographic Hash Function Implementations , 2018, IEEE Transactions on Reliability.

[11]  Robert E. Wiegand,et al.  Metamorphic model-based testing applied on NASA DAT: an experience report , 2015, ICSE 2015.

[12]  Huai Liu,et al.  Metamorphic Testing , 2018, ACM Comput. Surv..

[13]  Xin-Hua Hu,et al.  A Machine Learning Based Framework for Verification and Validation of Massive Scale Image Data , 2021, IEEE Transactions on Big Data.

[14]  Wei Wu,et al.  An Automatic Testing Approach for Compiler Based on Metamorphic Testing Technique , 2010, 2010 Asia Pacific Software Engineering Conference.

[15]  L. L. Pullum,et al.  Early Results from Metamorphic Testing of Epidemiological Models , 2012, 2012 ASE/IEEE International Conference on BioMedical Computing (BioMedCom).

[16]  Ewan D. Tempero,et al.  An empirical study of cycles among classes in Java , 2007, Empirical Software Engineering.

[17]  Lionel C. Briand,et al.  An Investigation of Graph-Based Class Integration Test Order Strategies , 2003, IEEE Trans. Software Eng..

[18]  Zhendong Su,et al.  Compiler validation via equivalence modulo inputs , 2014, PLDI.