Abstract

The test oracle problem exists widely in modern complex software testing, and metamorphic testing (MT) has become a promising testing technique to alleviate this problem. The inference of efficient metamorphic relations (MRs) is the core problem of metamorphic testing. Studies have proven that the combination of simple metamorphic relations can construct more efficient metamorphic relations. In most previous studies, metamorphic relations have been mainly manually inferred by experts with professional knowledge, which is an inefficient technique and hinders the application. In this paper, a genetic algorithm-based approach is proposed to construct composite metamorphic relations automatically for the program to be tested. We use a set of relation sequences to represent a particular class of MRs and turn the problem of inferring composite MRs into a problem of searching for suitable sequences. We then dynamically implement multiple executions of the program and use a genetic algorithm to search for the optimal set of relation sequences. We conducted empirical studies to evaluate our approach using scientific functions in the GNU scientific library (abbreviated as GSL). From the empirical results, our approach can automatically infer high-quality composite MRs, on average, five times more than basic MRs. More importantly, the inferred composite MRs can increase the fault detection capabilities by at least 30 % more than the original metamorphic relations.

Highlights

  • With the emergence of modern large-scale software systems, software testing has become an essential and expensive part of verifying the correctness of the program

  • In order to verify the effectiveness of our proposed approach, we select some scientific functions in the open-source software GNU scientific library for experimental verification and carry out three groups of experiments

  • The results show that the method of inferring the composition of metamorphic relations (CMR) based on the genetic algorithm can construct several composite metamorphic relations (MRs) with strong fault detection capabilities, and the mutation scores are much higher than the initial MRs, which verifies the feasibility of the proposed approach

Read more

Summary

Introduction

With the emergence of modern large-scale software systems, software testing has become an essential and expensive part of verifying the correctness of the program. In order to alleviate the oracle problem, metamorphic testing (MT) is a software testing method proposed by Chen [2,3], which does not need the test oracle. How to construct metamorphic relations efficiently and automatically is the core problem in metamorphic testing To alleviate this labor-intensive work, several works have been proposed to improve the inference of metamorphic relations. How to construct complex composite metamorphic relations automatically and improve failure-detection capabilities by making full use of the information in predefined simple metamorphic relations is a significant research issue. We propose a search-based automatic construction method of composite metamorphic relations by analyzing multiple executions of the program to be tested. The remainder of the paper is structured as follows: Section 2 introduces a brief review of the relevant works on the metamorphic relation inference, genetic algorithm, and search-based software testing.

Metamorphic Relation Inference
Genetic Algorithm
Search-Based Software Testing
Our Approach
Metamorphic Testing
Multi-Layer Composite Metamorphic Relations
GA-Based Approach for Searching Composite MRs
Representation of Individuals
Genetic Operators
Fitness Function
Experimental Results
Experimental Settings
CMR Inference
Quality of Inferred CMRs
Influence of Composite Layers
Conclusions
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.