Please wait a minute...
JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE)
    
Evolutionary generation of test data for path coverage through selecting target paths based on coverage difficulty
TIAN Tian,GONG Dun-wei
School of Information and Electrical Engineering, China University of Mining and Technology, Xuzhou 221116, China
Download:   PDF(981KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

In order to tackle the problem of generating test data covering paths of a message-passing parallel program, a method of evolutionarily generating test data was presented through selecting target paths based on the coverage difficulty. In the light of variables affecting a path’s execution, complexities of a path’s crucial conditions, and Halstead’s metric, the path which is the easiest to be covered was selected as the target path to reduce the coverage difficulty. The mathematical model for generating test data was built according to the selected path. A genetic algorithm was employed to solve the above model so as to generate test data covering the target path. The proposed method was applied to generate test data for five benchmark parallel programs and compared to the existing methods. The results show that the proposed method can reduce the computation cost, and effectively generate test data for path coverage of parallel programs with the less number of evaluated individuals.



Published: 26 November 2014
CLC:  TP 311  
Cite this article:

TIAN Tian,GONG Dun-wei. Evolutionary generation of test data for path coverage through selecting target paths based on coverage difficulty. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2014, 48(5): 948-994.

URL:

http://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2014.05.028     OR     http://www.zjujournals.com/eng/Y2014/V48/I5/948


基于覆盖难度选择路径的测试数据进化生成

为了解决消息传递并行程序路径覆盖测试数据生成问题,提出一种基于覆盖难度选择目标路径的测试数据进化生成方法.通过影响路径执行的变量、路径关键条件的复杂度,以及Halstead测度等,选择最容易覆盖的路径作为目标路径,以降低目标路径覆盖的难度;基于该路径,建立测试数据生成问题的数学模型;采用遗传算法生成覆盖目标路径的测试数据.将所提方法应用于5个基准并行程序的测试数据生成, 并与已有方法比较.结果表明,所提方法能够减少测试数据生成过程中的计算量,使用较少的个体评价次数,有效生成覆盖并行程序路径的测试数据.

[1] 李东, 宫云战. 软件测试方法综述[J]. 装甲兵工程学院学报, 2003, 17(2): 913.
LI Dong, GONG Yun-zhan. A summary about software testing methods [J]. Journal of Academy of Armored Force Engineering, 2003, 17(2): 913.
[2] 单锦辉, 姜瑛, 孙萍. 软件测试研究进展[J]. 北京大学学报:自然科学版, 2005, 41(1): 134145.
SHAN Jin-hui, JIANG Ying, SUN Ping. Research progress of software testing [J]. Acta Scientiarum Naturalium Universitatis Pekinensis, 2005, 41(1): 134145.
[3] 田甜, 巩敦卫. 消息传递并行程序路径覆盖测试数据生成问题的模型及其进化求解方法[J]. 计算机学报,2013, 36(11): 22122223
TIAN Tian, GONG Dun-wei. Model of test data generation for path coverage of message-passing parallel programs and its Evolution-based Solution [J]. Chinese Journal of computers, 2013, 36(11): 22122223.
[4] NGO M N, TAN H B K. Heuristics-based infeasible path detection for dynamic test data generation [J]. Information and Software Technology, 2008, 50(7): 641655.
[5] CHRISTAKIS M, SAGONAS K. Detection of asynchronous message passing errors using static analysis [C]∥Proceedings of the 13th International Symposium on Practical Aspects of Declarative Language. Berlin: Springer, 2011, 6539:518.
[6] GODEFROID P. Model checking for programming languages using verisoft [C]∥Proceedings of the Symposium on Principles of Programming Languages. New York: ACM, 1997: 174186.
[7] FLANAGAN C, GODEFROID P. Dynamic partial-order reduction for model checking software [C]∥ Proceedings of the Symposium on Principles of Programming Languages. New York: ACM, 2005: 110121.
[8] VAKKALANKA S, DELISI M, GOPALAKRISHNAN G. Implementing efficient dynamic formal verification methods for MPI programs [C]∥ Proceedings of the 15th European PVM/MPI Users Group Meeting. Berlin: Springer, 2008, 5205: 248256.
[9] HRUB V, KRENA B, LETKO Z. Testing of concurrent programs using genetic algorithms [C]∥Proceedings of the 4th International Symposium on Search Based Software Engineering. Berlin: Springer, 2012: 152167.
[10] STEENBUCK S, FRASER G. Generating unit tests for concurrent classes [C]∥ Proceedings of the 6th International Conference on Software Testing, Verification and Validation. New York: IEEE, 2013: 144153.
[11] CARVER R, LEI Y. Distributed reachability testing of concurrent programs [J]. Concurrency and Computation: Practice and Experience, 2010, 22(18): 24452466.
[12] KRAMMER B, RESCH M. Correctness checking of MPI one-sided communication using Marmot [C]∥Proceedings of the 13th European PVM/MPI Users Group Meeting. Berlin: Springer, 2006, 4192: 105114.
[13] VETTER J S, SUPINSKI B R. Dynamic software testing of MPI applications with umpire [C]∥Proceedings of the Supercomputing ACM/IEEE Conference. New York: IEEE, 2000: 7079.
[14] SOUZA S R S, VERGILIO S R, SOUZA P S L, et al. Structural testing criteria for message-passing parallel programs [J]. Concurrency and Computation: Practice and Experience, 2008, 20(16): 18931916.
[15] SOUZA P S L, SOUZA S R S, ZALUSKA E. Structural testing for message-passing concurrent programs an extended test model [J]. Concurrency and Computation: Practice and Experience, 2013, 25(18): 149158.
[16] SOUZA S R S, SOUZA P S L, MACHADO M C C, et al. Using coverage and reachability testing to improve concurrent program testing quality [C]∥Proceedings of the International Conference on Software Engineering and Knowledge Engineering. \[s.l\]:\[s.n.\],2011: 207212.
[17] XANTHAKIS S, ELLIS C, SKOURLAS C. Application of genetic algorithms to software testing [C]∥ Proceedings of the International Conference on Software Engineering and its Applications.\[s.l.\]:\[s.n.\], 1992: 625636.
[18] VARSHNEY S, MEHROTRA M. Search based software test data generation for structural testing: a perspective [J]. ACM SIGSOFT Software Engineering Notes, 2013, 38(4): 16.
[19] CONTE S D, DUNSMORE H E, SHEN V Y. Software engineering metrics and models [M]. San Francisco: Benjamin/Cummings, 1986.
[20] NEJMEH B A. NPATH: a measure of execution path complexity and its applications [J]. Communications of the ACM, 1988, 31(2): 188210.
[21] MCCABE T A. A complexity measure [J]. IEEE Transactions on Software Engineering, 1976, 2(4): 308320.
[22] HALSTEAD M. Elements of software science [M]. North-Holland: Elsevier Science, 1977.
[23] KUMAR A, TIWARI S, MISHRA K K,et al. Generation of efficient test data using path selection strategy with elitist GA in regression testing [C]∥Proceedings of the IEEE International Conference on Computer Science and Information Technology. New York: IEEE, 2010, 9: 389393.
[24] DEBBARMA M K, KAR N, SAHA A. Static and dynamic software metrics complexity analysis in regression testing [C]∥ Proceedings of the International Conference on Computer Communication and Informatics. New York: IEEE, 2012: 16.
[25] JEANNE F, KARL J O, JOE D W. The program dependence graph and its use in optimization [J]. ACM Transactions on Programming Languages and Systems, 1987, 9(3): 319349.
[26] CLARKE L A, RICHARDSON D J. Symbolic evaluation methods: implementations and applications [J]. Computer Program Testing, 1981, 65102.
[27] ZHANG J, WANG X X. A constraint solver and its application to path feasibility analysis [J]. International Journal of Software Engineering & Knowledge Engineering, 2011, 11(2): 139156.

[1] YUAN You-wei-, YU Jia, ZHENG Hong-sheng, WANG Jiao-jiao. Cloud workflow scheduling algorithm based on novelty ranking and multi-quality of service[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2017, 51(6): 1190-1196.
[2] XU Rong-bin, SHI Jun, ZHANG Peng-fei, XIE Ying. Similarity measurement of transition mapping relation using Petri net[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2017, 51(6): 1205-1213.
[3] WANG Haiyan, CHENG Yan . Dual service selection method based on coefficient of variation[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2017, 51(6): 1197-1204.
[4] CHANG Chao, LIU Ke-sheng, TAN Long-dan, JIA Wen-chao. Data flow analysis for C program based on graph model[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2017, 51(5): 1007-1015.
[5] WANG Ji kui . Bayesian conflicting Web data credibility algorithm[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2016, 50(12): 2380-2385.
[6] TU Ding, CHEN Ling, CHEN Gen cai, WU Yong, WANG Jing chang. Hierarchical online NMF for detecting and tracking topics[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2016, 50(8): 1618-1626.
[7] YANG Sha, YE Zhen yu, WANG Shu gang, TAO Hai, LI Shi jian. Perception enhanced intelligent robotic arm system[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2016, 50(6): 1155-1159.
[8] LUO Lin, SU Hong ye, BAN Lan. Nonparametric bayesian based on  mixture of dirichlet process in application of fault detection[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2015, 49(11): 2230-2236.
[9] WANG Hong-hao, WANG Hui-quan, JIN Zhong-he. Rollback-able on-board software upgrade method based on incremental link[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2015, 49(4): 724-731.
[10] WANG Ji-kui, LI Shao-bo. Quality evaluation algorithm for conflicting data sources based on true value finding[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2015, 49(2): 303-318.
[11] CAI Hua-lin, CHEN Gang, CHEN Ke. Spatial matching on multi-type resource[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2015, 49(1): 69-78.
[12] YU Dong-jin, YIN Yu-yu, WU Meng-meng, LIU Yu. QoS prediction for Web services based on hybrid collaborative filtering[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2014, 48(11): 2039-2045.
[13] KE Hai-feng, YING Jing. Real-time license character recognition technology based on R-ELM[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2014, 48(7): 1209-1216.
[14] LIU Zhi-hui, ZHANG Quan-ling. Research overview of big data technology[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2014, 48(6): 957-972.
[15] KE Hai-feng, YING Jing. Real-time license character recognition technology based on R-ELM[J]. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 2014, 48(2): 0-0.