Evolutionary selection for regression test cases based on diversity

  • PDF / 224,846 Bytes
  • 3 Pages / 612.284 x 802.205 pts Page_size
  • 106 Downloads / 212 Views

DOWNLOAD

REPORT


Evolutionary selection for regression test cases based on diversity Baoying MA1 , Li WAN2 , Nianmin YAO

3

, Shuping FAN4 , Yan ZHANG4

1

4

School of Health Management, Mudanjiang Medical University, Mudanjiang 157011, China 2 Department of intelligence and Computing, Tianjin University, Tianjin 300350, China 3 School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China School of Computer and Information Technology, Mudanjiang Normal University, Mudanjiang 157011, China

c Higher Education Press 2020 

1

Introduction

Regression testing refers to retest code after modification to ensure that changes will not introduce new faults or cause faults in other lines of code [1]. Regression test selection (RTS) is one of the predominant techniques. It identifies test cases that are relevant to test recent changes in an application and seeks to reduce the number of test suite while preserving the capability to reveal faults [2]. Currently, there are many test case selection techniques such as coverage-based, similarity-based, minimization-based and fault-oriented [3–5], etc. Although these techniques are effective in different scenarios. The balance of the selected test cases traversing program branches is not considered. The result of the imbalanced test is that some program branches may be traversed by many test cases, while others traversed by few or no one. Thus the branches that are not traversed will not be tested. This results in low path coverage and affects the faults finding in programs. If the balance is considered in RTS, the quality of selected test cases will undoubtedly be improved. In this paper, we focus on the RTS technique to obtain a balanced test of the program under test. We proposed a diversitybased regression test selection method. Our goal is to select test cases that can achieve balanced testing to improve fault detection rate. To achieve this goal, we first introduce the concept of branch balance of branch nodes and give a calculation method of coverage balance based on it. Then, we give a method of calculating path coverage. Finally, each individual of genetic algorithm (GA) is represented as a subset of test cases. The coverage balance and path coverage are used for selecting test cases. Experimental results show that our method can effectively select test cases that not only traverse target paths but also achieve high fault detection rate. The main contributions of this study are as follows: 1) We propose to select test cases by coverage balance and path coverage; 2) We present a diversity-based evolutionary algorithm to solve the RTS problem effectively; 3) We conduct some experiments and use six metrics to verify the effectiveness of our method.

The technical details and evaluations can be found in the Online Resource.

2

Evolutionary selection for test cases

We propose to select test cases for covering multiple paths to achieve a balanced test of program branches by GA. The details are as follows. 2.1 Framework of test case selection Figure 1 shows the