Abstract
Over the past decade, metamorphic testing has gained rapidly increasing attention from both academia and industry, particularly thanks to its high efficacy on revealing real-life software faults in a wide variety of application domains. On the basis of a set of metamorphic relations among multiple software inputs and their expected outputs, metamorphic testing not only provides a test case generation strategy by constructing new (or follow-up) test cases from some original (or source) test cases, but also a test result verification mechanism through checking the relationship between the outputs of source and follow-up test cases. Many efforts have been made to further improve the cost-effectiveness of metamorphic testing from different perspectives. Some studies attempted to identify “good” metamorphic relations, while other studies were focused on applying effective test case generation strategies especially for source test cases. In this article, we propose improving the cost-effectiveness of metamorphic testing by leveraging the feedback information obtained in the test execution process. Consequently, we develop a new approach, namely feedback-directed metamorphic testing, which makes use of test execution information to dynamically adjust the selection of metamorphic relations and selection of source test cases. We conduct an empirical study to evaluate the proposed approach based on four laboratory programs, one GNU program, and one industry program. The empirical results show that feedback-directed metamorphic testing can use fewer test cases and take less time than the traditional metamorphic testing for detecting the same number of faults. It is clearly demonstrated that the use of feedback information about test execution does help enhance the cost-effectiveness of metamorphic testing. Our work provides a new perspective to improve the efficacy and applicability of metamorphic testing as well as many other software testing techniques.
- [1] . 2021. Testing web enabled simulation at scale using metamorphic testing. In Proceedings of the 2021 IEEE/ACM 43rd International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP’21). 140–149.Google ScholarDigital Library
- [2] . 2011. A practical guide for using statistical tests to assess randomized algorithms in software engineering. In Proceedings of the 33rd International Conference on Software Engineering (ICSE’11). 1–10.Google ScholarDigital Library
- [3] . 2011. On testing effectiveness of metamorphic relations: A case study. In Proceedings of the 15th International Conference on Secure Software Integration and Reliability Improvement (SSIRI’11). 147–156.Google ScholarDigital Library
- [4] . 2021. Generating metamorphic relations for cyber-physical systems with genetic programming: An industrial case study. In Proceedings of the ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE’21). 1264–1274.Google ScholarDigital Library
- [5] . 2015. The oracle problem in software testing: A survey. IEEE Transactions on Software Engineering 41, 5 (2015), 507–525.Google ScholarDigital Library
- [6] . 2016. A cost-effective random testing method for programs with non-numeric inputs. IEEE Transactions on Computers 65, 12 (2016), 3509–3523.Google ScholarDigital Library
- [7] . 2016. The impact of source test case selection on the effectiveness of metamorphic testing. In Proceedings of the 1st International Workshop on Metamorphic Testing (MET’16), Co-Located with the 38th International Conference on Software Engineering (ICSE’16). 5–11.Google ScholarDigital Library
- [8] and (Eds.). 2014. SWEBOK: Guide to the Software Engineering Body of Knowledge (version 3.0 ed.). IEEE Computer Society, Los Alamitos, CA.Google Scholar
- [9] . 1990. On the performance of software testing using multiple versions. In Proceedings of the 20th International Symposium on Fault-Tolerant Computing (FTCS’90). 408–415.Google ScholarCross Ref
- [10] . 2002. Optimal software testing and adaptive software testing in the context of software cybernetics. Information and Software Technology 44, 14 (2002), 841–855.Google ScholarCross Ref
- [11] . 2002. Towards research on software cybernetics. In Proceedings of the 7th IEEE International Symposium on High Assurance Systems Engineering (HSE’02). 240–241.Google Scholar
- [12] . 2007. Adaptive software testing with fixed-memory feedback. Journal of Systems and Software 80, 8 (2007), 1328–1348.Google ScholarDigital Library
- [13] . 2007. Software cybernetics. Wiley Encyclopedia of Computer Science and Engineering (2007). Google ScholarCross Ref
- [14] . 2021. Breaking neural reasoning architectures with metamorphic relation-based adversarial examples. IEEE Transactions on Neural Networks and Learning Systems (2021). Google ScholarCross Ref
- [15] . 1998. Metamorphic Testing: A New Approach for Generating Next Test Cases.
Technical Report . Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong, Tech. Rep. HKUST-CS98-01.Google Scholar - [16] . 2009. An innovative approach for testing bioinformatics programs using metamorphic testing. BMC Bioinformatics 10, 1 (2009), 24–32.Google ScholarCross Ref
- [17] . 2004. Case studies on the selection of useful relations in metamorphic testing. In Proceedings of the 4th lberoAmerican Symposium on Software Engineering and Knowledge Engineer-ing (JIISIC’04). 569–583.Google Scholar
- [18] . 2018. Metamorphic testing: A review of challenges and opportunities. ACM Computing Surveys 51, 1 (2018), 4:1–4:27.Google Scholar
- [19] . 2004. Metamorphic testing and testing with special values. In Proceedings of the 5th ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD’04). 128–134.Google Scholar
- [20] . 2016. Metamorphic testing for cybersecurity. Computer 49, 6 (2016), 48–55.Google ScholarDigital Library
- [21] . 2004. Adaptive random testing. In Proceedings of the 9th Asian Computing Science Conference (ASIAN’04). 320–329.Google ScholarDigital Library
- [22] . 2016. METRIC: Metamorphic relation identification based on the category-choice framework. Journal of Systems and Software 116 (2016), 177–190.Google ScholarDigital Library
- [23] . 2021. New visions on metamorphic testing after a quarter of a century of inception. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE’21). 1487–1490.Google ScholarDigital Library
- [24] . 1994. On the relationship between partition and random testing. IEEE Transactions on Software Engineering 20, 12 (1994), 977–980.Google ScholarDigital Library
- [25] . 2005. On the use of specification-based assertions as test oracles. In Proceedings of the 29th IEEE/NASA Software Engineering Workshop (SEW’05). 305–314.Google ScholarDigital Library
- [26] . 2005. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Software Engineering 10, 4 (2005), 405–435.Google ScholarDigital Library
- [27] . 2013. Security assurance with program path analysis and metamorphic testing. In Proceedings of the 4th IEEE International Conference on Software Engineering and Service Science (ICSESS’13). 193–197.Google Scholar
- [28] . 2006. GNU grep. (2006). Retrieved from http://www.gnu.org/software/grep.Google Scholar
- [29] . 2012. Automatically finding performance problems with feedback-directed learning software testing. In Proceedings of the 34th International Conference on Software Engineering (ICSE’12). 156–166.Google ScholarDigital Library
- [30] . 2002. Random testing. In Proceedings of the Encyclopedia of Software Engineering. John Wiley & Sons, Inc.Google ScholarCross Ref
- [31] . 2020. Structure-invariant testing for machine translation. In Proceedings of the 42nd International Conference on Software Engineering (ICSE’20). 961–973.Google ScholarDigital Library
- [32] . 2020. Testing high performance numerical simulation programs: Experience, lessons learned, and open issues. In Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA’20). 502–515.Google ScholarDigital Library
- [33] . 2014. Statistical Methods for Meta-Analysis. Academic Press.Google Scholar
- [34] . 2019. How to specify it!. In Proceedings of the 20th International Symposium on Trends in Functional Programming (TFP’19) (Lecture Notes in Computer Science), Vol. 12053. 58–83.Google Scholar
- [35] . 2017. Identifying failed test cases through metamorphic testing. In Proceedings of the 28th International Symposium on Software Reliability Engineering Workshops (ISSREW’17). 90–91.Google ScholarCross Ref
- [36] . 2010. Automating software tests with partial oracles in integrated environments. In Proceedings of the 5th Workshop on Automation of Software Test (AST’10). 91–94.Google ScholarDigital Library
- [37] . 2018. Perffuzz: Automatically generating pathological inputs. In Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA’18). 254–265.Google ScholarDigital Library
- [38] . 2018. Fairfuzz: A targeted mutation strategy for increasing greybox fuzz testing coverage. In Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering. 475–485.Google ScholarDigital Library
- [39] . 2015. Approach for test profile optimization in dynamic random testing. In Proceedings of the 39th International Computer Software and Applications Conference (COMPSAC’15), Vol. 3. 466–471.Google ScholarDigital Library
- [40] . 2014. How effectively does metamorphic testing alleviate the oracle problem? IEEE Transactions on Software Engineering 40, 1 (2014), 4–22.Google ScholarDigital Library
- [41] . 2012. A new method for constructing metamorphic relations. In Proceedings of the 12th International Conference on Quality Software (QSIC’12). 59–68.Google ScholarDigital Library
- [42] . 2011. A sufficient condition for parameters estimation in dynamic random testing. In Proceedings of the 35th IEEE Annual International Computer Software and Applications Conference Workshops (COMPSACW’11). 19–24.Google ScholarDigital Library
- [43] . 2014. On the asymptotic behavior of adaptive testing strategy for software reliability assessment. IEEE Transactions on Software Engineering 40, 4 (2014), 396–412.Google ScholarDigital Library
- [44] . 2020. Metamorphic testing and certified mitigation of fairness violations in NLP models. In Proceedings of the 29th International Joint Conference on Artificial Intelligence (IJCAI’20). 458–465.Google ScholarCross Ref
- [45] . 2005. MuJava: An automated class mutation system. Software Testing, Verification and Reliability 15, 2 (2005), 97–133.Google ScholarCross Ref
- [46] . 2020. Metamorphic security testing for web systems. In Proceedings of the 13th IEEE International Conference on Software Testing, Validation and Verification (ICST’20). 186–197.Google ScholarCross Ref
- [47] . 2021. Metamorphic testing of datalog engines. In Proceedings of the ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE’21). 639–650.Google ScholarDigital Library
- [48] . 2019. Challenges of testing machine learning based systems. In Proceedings of the 1st IEEE International Conference On Artificial Intelligence Testing (AITest’19). 101–102.Google ScholarCross Ref
- [49] . 2006. An empirical study on the selection of good metamorphic relations. In Proceedings of the 30th Annual International Computer Software and Applications Conference (COMPSAC’06). 475–484.Google ScholarDigital Library
- [50] . 2020. Surfacing visualization mirages. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems (CHI’20). 1–16.Google ScholarDigital Library
- [51] . 1988. The category-partition method for specifying and generating fuctional tests. Communications of the ACM 31, 6 (1988), 676–686.Google ScholarDigital Library
- [52] . 2008. Finding errors in. net with feedback-directed random testing. In Proceedings of the 7th International Symposium on Software Testing and Analysis (ISSTA’08). 87–96.Google ScholarDigital Library
- [53] . 2007. Feedback-directed random test generation. In Proceedings of the 29th International Conference on Software Engineering (ICSE’07). 75–84.Google ScholarDigital Library
- [54] . 2018. A mapping study on testing non-testable systems. Software Quality Journal 26, 4 (2018), 1373–1413.Google ScholarDigital Library
- [55] . 2022. Theoretical and empirical analyses of the effectiveness of metamorphic relation composition. IEEE Transactions on Software Engineering 48, 3 (2022), 1001–1007.Google ScholarCross Ref
- [56] . 2020. Beyond accuracy: Behavioral testing of NLP models with checkList. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL’20). 4902–4912.Google ScholarCross Ref
- [57] . 2009. New effect size rules of thumb. Journal of Modern Applied Statistical Methods 8, 2 (2009), 467–474.Google ScholarCross Ref
- [58] . 2015. Feedback-driven combinatorial test design and execution. In Proceedings of the 8th ACM International Systems and Storage Conference. 1–6.Google ScholarDigital Library
- [59] . 2016. A survey on metamorphic testing. IEEE Transactions on Software Engineering 42, 9 (2016), 805–824.Google ScholarCross Ref
- [60] . 2018. Metamorphic testing of RESTful web APIs. IEEE Transactions on Software Engineering 44, 11 (2018), 1083–1099.Google ScholarCross Ref
- [61] . 2020. Adaptive metamorphic testing with contextual bandits. Journal of Systems and Software 165 (2020), 110574:1–110574:14.Google ScholarCross Ref
- [62] . 2018. Adaptive partition testing. IEEE Transactions on Computers 68, 2 (2018), 157–169.Google ScholarDigital Library
- [63] . 2022. Dynamic random testing of web services: A methodology and evaluation. IEEE Transactions on Services Computing 15, 2 (2022), 736–751.Google ScholarCross Ref
- [64] . 2021. METRIC+: A metamorphic relation identification technique based on input plus output domains. IEEE Transactions on Software Engineering 47, 9 (2021), 1765–1786.Google Scholar
- [65] . 2016. \(\mu\)MT: A data mutation directed metamorphic relation acquisition methodology. In Proceedings of 2016 IEEE/ACM the 1st International Workshop on Metamorphic Testing (MET’16), Co-Located with the 38th International Conference on Software Engineering (ICSE’16). 12–18.Google Scholar
- [66] . 2014. A property-based testing framework for encryption programs. Frontiers of Computer Science 8, 3 (2014), 478–489.Google ScholarDigital Library
- [67] . 2018. DeepTest: Automated testing of deep-neural-network-driven autonomous cars. In Proceedings of the 40th International Conference on Software Engineering (ICSE’18). 303–314.Google ScholarDigital Library
- [68] . 2013. Metamorphic slice: An application in spectrum-based fault localization. Information and Software Technology 55, 5 (2013), 866–879.Google ScholarDigital Library
- [69] . 2017. Modern software cybernetics: New trends. Journal of System and Software 124 (2017), 157–169.Google ScholarDigital Library
- [70] . 2014. Dynamic random testing with parameter adjustment. In Proceedings of the 38th IEEE Annual International Computer Software and Applications Conference Workshops (COMPSACW’14). 37–42.Google ScholarDigital Library
- [71] . 2021. Perception matters: Detecting perception failures of VQA models using metamorphic testing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR’21). 16908–16917.Google ScholarCross Ref
- [72] . 2014. Search-based inference of polynomial metamorphic relations. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (ASE’14). 701–712.Google ScholarDigital Library
- [73] . 2022. Machine learning testing: Survey, landscapes and horizons. IEEE Transactions on Software Engineering 48, 1 (2022), 1–36.Google ScholarDigital Library
- [74] . 2014. A history-based dynamic random software testing. In Proceedings of the 38th International Computer Software and Applications Conference Workshops (COMPSACW’14). 31–36.Google ScholarDigital Library
Index Terms
- Feedback-Directed Metamorphic Testing
Recommendations
Metamorphic Testing: A Review of Challenges and Opportunities
Metamorphic testing is an approach to both test case generation and test result verification. A central element is a set of metamorphic relations, which are necessary properties of the target function or algorithm in relation to multiple inputs and ...
Fault detection effectiveness of source test case generation strategies for metamorphic testing
MET '18: Proceedings of the 3rd International Workshop on Metamorphic TestingMetamorphic testing is a well known approach to tackle the oracle problem in software testing. This technique requires the use of source test cases that serve as seeds for the generation of follow-up test cases. Systematic design of test cases is ...
On Testing Effectiveness of Metamorphic Relations: A Case Study
SSIRI '11: Proceedings of the 2011 Fifth International Conference on Secure Software Integration and Reliability ImprovementOne fundamental challenge for software testing is the oracle problem, which means that either there does not exist a mechanism (called oracle) to verify the test output given any possible program input, or it is very expensive, if not impossible, to ...
Comments