A New Method of Test Data Generation for Branch Coverage in Software Testing Based on EPDG and Genetic Algorithm

作者:Chen Ciyong; Xu Xiaofeng; Chen Yan; Li Xiaochao; Guo Donghui*
来源:3rd International Conference on Anti-counterfeiting, Security, and Identification in Communication, 2009-08-20 to 2009-08-22.

摘要

A new method called EPDG-GA which utilizes the Edge Partitions Dominator Graph (EPDG) and Genetic Algorithm (GA) for branch coverage testing is presented in this paper. First, a set of Critical Branches (CBs) are obtained by analyzing the EPDG of the tested program, while covering all the CBs implies covering all the branches of the Control Flow Graph (CFG). Then, the fitness functions are instrumented in the right position by analyzing the Pre-Dominator Tree (PreDT), and two metrics are developed to prioritize the CBs. Coverage-Table is established to record the CBs information and keeps track of whether a branch is executed or not. GA is used to generate test data to cover CBs so as to cover all the branches. The comparison results show that this approach is more efficient than random testing approach.