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.
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.
[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 Users 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.