Int J Performability Eng ›› 2019, Vol. 15 ›› Issue (10): 2667-2674.doi: 10.23940/ijpe.19.10.p12.26672674

• Orginal Article • Previous Articles     Next Articles

Automatic Software Testing Target Path Selection using K-Means Clustering Algorithm

Yan Zhanga, Li Qiaob, Xingya Wangb*, Jingying Caia, and Xuefei Liuc   

  1. aDepartment of Computer and Information Technology, Mudanjiang Normal University, Mudanjiang, 157012, China
    bState Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, 210093, China
    cDepartment of Computer Science and Technology, Heilongjiang University, Harbin, 150080, China
  • Submitted on ; Revised on ; Accepted on
  • Contact: Wang Xingya
  • About author:

    * Corresponding author. E-mail address: xingyawang@nju.edu.cn

  • Supported by:
    This study was jointly funded by the National Natural Science Foundation of China (No 61573362), Heilongjiang Natural Science Foundation (No F2016039), Heilongjiang Provincial Department of Education Basic Research Business Expenses Project (No 2018-KYYWF-0419, 1353MSYYB005), Jiangsu Planned Projects for Postdoctoral Research Funds (No 2018K028C), Innovation Project for State Key Laboratory for Novel Software Technology (No ZZKT2018B02), Mudanjiang Science and Technology Plan Project (No Z2016s0027), and Mudanjiang Normal University Research Project (No GP201602, FD2014001, QY2014001, KB0263)

Abstract:

Path testing is an effective method of software testing. It is not realistic to achieve coverage for all paths during complex software testing. Selecting the correct paths as target paths is a key problem. A method of selecting target paths based on the K-means algorithm is presented in this study. First, we divide paths into different groups using the K-means algorithm, so that paths having high similarity are divided into the same group. Then, we choose the cluster centers as targets and ensure that the selected target paths have more considerable differentiation, which guarantees the adequacy of later testing. The experimental results demonstrate the effectiveness of the proposed method.

Key words: path coverage, software testing, K-means, clustering center, test adequacy