Metamorphic Relation Patterns for Query-Based Systems

Searching and displaying data based on user queries is a key feature of most software applications such as information systems, web portals, web APIs, and data analytic platforms. The large volume of data managed by these types of systems, henceforth called query-based systems (QBS), makes them extremely hard to test due to the difficulty to assess whether the output of a query is correct, the so-called oracle problem. Metamorphic testing has proved to be a very effective approach to alleviate the oracle problem in QBS, enabling the detection of bugs in data repositories, large e-commerce sites, and some of the most used software applications worldwide such as Google Search and YouTube. We have observed, however, that the metamorphic relations used to test different types of QBS are very similar, regardless of their domain, since all of them exploit standard query features such as filtering and ordering. Inspired by this finding, in this paper we present a catalogue of metamorphic relation patterns to assist testers in the identification and inference of metamorphic relations in QBS. For the definition of the patterns we resorted to the root of most query languages: relational algebra. We show how the proposed patterns help in the identification of metamorphic relations in the e-commerce platform PrestaShop, the email service Gmail, and the mobile application of video streaming HBO.

[1]  James M. Bieman,et al.  Predicting metamorphic relations for testing scientific software: a machine learning approach using graph kernels , 2016, Softw. Test. Verification Reliab..

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

[3]  E. F. CODD,et al.  A relational model of data for large shared data banks , 1970, CACM.

[4]  Mikael Lindvall,et al.  Metamorphic Model-Based Testing Applied on NASA DAT -- An Experience Report , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

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

[6]  Tsong Yueh Chen,et al.  Metamorphic Testing: A New Approach for Generating Next Test Cases , 2020, ArXiv.

[7]  Tsong Yueh Chen,et al.  Automated functional testing of web search engines in the absence of an oracle , 2007 .

[8]  Sergio Segura Metamorphic Testing: Challenges Ahead , 2018, 2018 IEEE/ACM 3rd International Workshop on Metamorphic Testing (MET).

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

[10]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[11]  Dave Towey,et al.  Metamorphic Relations for Enhancing System Understanding and Use , 2020, IEEE Transactions on Software Engineering.

[12]  Mark Harman,et al.  The Oracle Problem in Software Testing: A Survey , 2015, IEEE Transactions on Software Engineering.

[13]  Jennifer Widom,et al.  Database Systems: The Complete Book , 2001 .

[14]  Gail E. Kaiser,et al.  Dynamic Inference of Likely Metamorphic Properties to Support Differential Testing , 2015, 2015 IEEE/ACM 10th International Workshop on Automation of Software Test.

[15]  Tong Wu,et al.  Self-Checked Metamorphic Testing of an Image Processing Program , 2010, 2010 Fourth International Conference on Secure Software Integration and Reliability Improvement.

[16]  Sergio Segura,et al.  Metamorphic Testing of RESTful Web APIs , 2018, IEEE Transactions on Software Engineering.

[17]  Sergio Segura,et al.  Metamorphic Testing: Testing the Untestable , 2020, IEEE Software.

[18]  Shin Nakajima,et al.  Dataset Coverage for Testing Machine Learning Computer Programs , 2016, 2016 23rd Asia-Pacific Software Engineering Conference (APSEC).

[19]  Tsong Yueh Chen,et al.  Metamorphic Testing for Software Quality Assessment: A Study of Search Engines , 2016, IEEE Transactions on Software Engineering.

[20]  Tsong Yueh Chen,et al.  Automated functional testing of online search services , 2012, Softw. Test. Verification Reliab..

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

[22]  Sergio Segura,et al.  Automated inference of likely metamorphic relations for model transformations , 2018, J. Syst. Softw..

[23]  James M. Bieman,et al.  Using machine learning techniques to detect metamorphic relations for programs without test oracles , 2013, 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE).