当前位置: X-MOL 学术Data Technol. Appl. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Mutation reduction in software mutation testing using firefly optimization algorithm
Data Technologies and Applications ( IF 1.6 ) Pub Date : 2020-05-25 , DOI: 10.1108/dta-08-2019-0140
Nasrin Shomali , Bahman Arasteh

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.



中文翻译:

使用萤火虫优化算法进行软件变异测试中的变异减少

目的

为了交付高质量的软件应用程序,需要进行适当的测试。如果可以发现更多软件故障,则软件测试将成功运行。评估测试套件质量和有效性的传统方法是变异测试。变异测试的主要缺点之一是其计算成本。这项研究的研究问题是突变测试的高计算成本。减少突变测试的时间和成本是本研究的主要目标。

设计/方法/方法

关于80–20规则,在程序的20%容易出错的代码中发现80%的错误。所提出的方法静态分析程序的源代码,以识别程序中易于出错的位置。识别程序中易于出错(复杂)的路径是一个NP难题。在该方法中,使用萤火虫优化算法来识别程序中最容易出现故障的路径。然后,仅在识别出的容易出错的指令上注入变异算子。

发现

使用五个传统基准程序的源代码来评估所提出方法减少突变体数量的有效性。该方法在Matlab中实现。突变注入操作由MuJava进行,并研究了输出。结果证实了所提出的方法大大减少了突变体的数量,从而降低了软件突变测试的成本。

创意/价值

所提出的方法避免了程序的非易错(简单)代码的突变,因此,大大减少了突变体的数量。在具有n条分支指令(如果有指令)的程序中,有2n条执行路径(测试路径),这些路径中的数据和代码可以视为变异的目标。识别程序中容易出错(复杂)的路径是一个NP难题。在该方法中,使用萤火虫优化算法作为启发式算法来识别程序中最容易出错的路径。然后,仅在识别出的容易出错的指令上注入变异算子(错误)。

更新日期:2020-05-25
down
wechat
bug