To read this content please select one of the options below:

Mutation reduction in software mutation testing using firefly optimization algorithm

Nasrin Shomali (Department of Computer Engineering, Islamic Azad University-Tabriz Branch, Tabriz, Iran)
Bahman Arasteh (Department of Computer Engineering, Islamic Azad University-Tabriz Branch, Tabriz, Iran)

Data Technologies and Applications

ISSN: 2514-9288

Article publication date: 2 June 2020

Issue publication date: 25 August 2020

251

Abstract

Purpose

For delivering high-quality software applications, proper testing is required. A software test will function successfully if it can find more software faults. The traditional method of assessing the quality and effectiveness of a test suite is mutation testing. One of the main drawbacks of mutation testing is its computational cost. The research problem of this study is the high computational cost of the mutation test. Reducing the time and cost of the mutation test is the main goal of this study.

Design/methodology/approach

With regard to the 80–20 rule, 80% of the faults are found in 20% of the fault-prone code of a program. The proposed method statically analyzes the source code of the program to identify the fault-prone locations of the program. Identifying the fault-prone (complex) paths of a program is an NP-hard problem. In the proposed method, a firefly optimization algorithm is used for identifying the most fault-prone paths of a program; then, the mutation operators are injected only on the identified fault-prone instructions.

Findings

The source codes of five traditional benchmark programs were used for evaluating the effectiveness of the proposed method to reduce the mutant number. The proposed method was implemented in Matlab. The mutation injection operations were carried out by MuJava, and the output was investigated. The results confirm that the proposed method considerably reduces the number of mutants, and consequently, the cost of software mutation-test.

Originality/value

The proposed method avoids the mutation of nonfault-prone (simple) codes of the program, and consequently, the number of mutants considerably is reduced. In a program with n branch instructions (if instruction), there are 2n execution paths (test paths) that the data and codes into each of these paths can be considered as a target of mutation. Identifying the error-prone (complex) paths of a program is an NP-hard problem. In the proposed method, a firefly optimization algorithm as a heuristic algorithm is used for identifying the most error-prone paths of a program; then, the mutation operators (faults) are injected only on the identified fault-prone instructions.

Keywords

Citation

Shomali, N. and Arasteh, B. (2020), "Mutation reduction in software mutation testing using firefly optimization algorithm", Data Technologies and Applications, Vol. 54 No. 4, pp. 461-480. https://doi.org/10.1108/DTA-08-2019-0140

Publisher

:

Emerald Publishing Limited

Copyright © 2020, Emerald Publishing Limited

Related articles