Identifying metamorphic relations: A data mutation directed approach
-
Published:2023-10-18
Issue:
Volume:
Page:
-
ISSN:0038-0644
-
Container-title:Software: Practice and Experience
-
language:en
-
Short-container-title:Softw Pract Exp
Author:
Sun Chang‐ai1ORCID,
Jin Hui1,
Wu SiYi1,
Fu An1,
Wang ZuoYi1,
Chan Wing Kwong2
Affiliation:
1. School of Computer and Communication Engineering University of Science and Technology Beijing Beijing China
2. Department of Computer Science City University of Hong Kong Hong Kong China
Abstract
SummaryMetamorphic testing (MT) is an effective technique to alleviate the test oracle problem. The principle of MT is to detect failures by checking whether some necessary properties, commonly known as metamorphic relations (MRs), of software under test (SUT) hold among multiple executions of source and follow‐up test cases. Since both the generation of follow‐up test cases and test result verification depend on MRs, the identification of MRs plays a key role in MT, which is an important yet difficult task requiring deep domain knowledge of the SUT. Accordingly, techniques that can direct a tester to identify MRs effectively are desirable. In this paper, we propose MT, a data mutation directed approach to identifying MRs. MT guides a tester to identify MRs by providing a set of data mutation operators and template‐style mapping rules, which not only alleviates the difficulties faced in the process of MR identification but also improves the identification effectiveness. We have further developed a tool to implement the proposed approach and conducted an empirical study to evaluate the MR identification effectiveness of MT and the performance of MRs identified by MT with respect to fault detection capability and statement coverage. The empirical results show that MT is able to identify MRs for numeric programs effectively, and the identified MRs have high fault detection capability and statement coverage. The work presented in this paper advances the field of MT by providing a simple yet practical approach to the MR identification problem.
Funder
National Natural Science Foundation of China
Chinese Aeronautical Establishment
Beijing Natural Science Foundation
City University of Hong Kong
Fundamental Research Funds for the Central Universities
Reference74 articles.
1. SunCA LiuY WangZ ChanW.μMT: a data mutation directed metamorphic relation acquisition methodology. Proceedings of the 1st IEEE/ACM International Workshop on Metamorphic Testing (MET'16) in Conjunction with the 38th International Conference on Software Engineering (ICSE'16). IEEE.201612–18.
2. Oracles for Distributed Testing
3. HarmanM McminnP ShahbazM YooS.A Comprehensive Survey of Trends in Oracles for Software Testing. University of Sheffield Department of Computer Science Tech. Rep. CS‐13‐012013.
4. The Oracle Problem in Software Testing: A Survey