MRGS‐ART: Metamorphic Relation and Group Selection Based on Adaptive Random Testing
Zhihao Ying,Dave Towey,Anthony Graham Bellotti,Zhi Quan Zhou
DOI: https://doi.org/10.1002/stvr.1908
2024-11-29
Software Testing Verification and Reliability
Abstract:Metamorphic testing can effectively detect software faults, using metamorphic relations and metamorphic groups. This paper presents a new metric for guiding their selection, from a new perspective, and presents an algorithm (MRGS‐ART) to implement it. Experimental results show that MRGS‐ART can enhance the fault‐detection capability of metamorphic testing. Metamorphic testing (MT) is effective in detecting software failures; it detects failures by examining the metamorphic relations (MRs) among source test cases (STCs), follow‐up test cases (FTCs) and their respective outputs. The STCs together with the corresponding FTCs, considered as a whole, are called metamorphic groups (MGs). MT performance relies heavily on the MRs and MGs. Previous studies have mainly focused on improving MT performance by identifying effective MRs, or through generation of MGs with high quality, but have somewhat neglected the selection of MRs and MGs from existing ones. In this paper, we address this issue by introducing a new metric for guiding the selection of effective MR‐MG pairs from a new perspective: The MR‐MG pair is chosen such that the MR makes the current MG as far away as possible from the executed MGs. We design an MR‐MG pair selection algorithm, named metamorphic relation and group selection based on adaptive random testing (MRGS‐ART), to implement our metric. The intuition behind MRGS‐ART is that we attempt to improve MT performance by achieving an even distribution of STCs and FTCs in their corresponding input domains for all the MRs used. Experimental results indicate that MRGS‐ART can enhance MT performance. We believe that this is the first comprehensive and systematic demonstration, from the perspective of both MRs and MGs, that making STCs and FTCs evenly distributed in their corresponding input domains can improve MT performance. Finally, by analysing the experimental results, we provide guidance on how to most effectively implement MRGS‐ART.
computer science, software engineering