Please wait a minute...
浙江大学学报(工学版)
计算机科学技术     
基于覆盖难度选择路径的测试数据进化生成
田甜,巩敦卫
中国矿业大学 信息与电气工程学院,江苏 徐州 221116
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
 全文: PDF(981 KB)   HTML
摘要:

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

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.

出版日期: 2014-11-26
:  TP 311  
基金资助:

国家自然科学基金资助项目(61075061, 61203304, 61375067);高等学校博士学科点专项科研基金资助项目(20100095110006);江苏省自然科学基金资助项目(BK2012566);江苏省普通高校研究生科研创新计划资助项目(CXZZ11_0292).

通讯作者: 巩敦卫,男,教授.     E-mail: dwgong@vip.163.com
作者简介: 田甜(1987-),女,博士生,从事并行软件测试的科研工作.E-mail: tian_tiantian@126.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  

引用本文:

田甜,巩敦卫. 基于覆盖难度选择路径的测试数据进化生成[J]. 浙江大学学报(工学版), 10.3785/j.issn.1008-973X.2014.05.028.

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), 10.3785/j.issn.1008-973X.2014.05.028.

链接本文:

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

[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] 袁友伟, 余佳, 郑宏升, 王娇娇. 基于新颖性排名和多服务质量的云工作流调度算法[J]. 浙江大学学报(工学版), 2017, 51(6): 1190-1196.
[2] 许荣斌, 石军, 张鹏飞, 谢莹. Petri网的映射变迁关系相似性度量[J]. 浙江大学学报(工学版), 2017, 51(6): 1205-1213.
[3] 王海艳, 程严. 基于离散系数的双向服务选择方法[J]. 浙江大学学报(工学版), 2017, 51(6): 1197-1204.
[4] 常超, 刘克胜, 谭龙丹, 贾文超. 基于图模型的C程序数据流分析[J]. 浙江大学学报(工学版), 2017, 51(5): 1007-1015.
[5] 王继奎. 贝叶斯冲突Web数据可信度算法[J]. 浙江大学学报(工学版), 2016, 50(12): 2380-2385.
[6] 涂鼎, 陈岭, 陈根才, 吴勇, 王敬昌. 基于在线层次化非负矩阵分解的文本流主题检测[J]. 浙江大学学报(工学版), 2016, 50(8): 1618-1626.
[7] 杨莎, 叶振宇, 王淑刚, 陶海, 李石坚, 潘纲, 朱斌. 感认知增强的智能机械手系统[J]. 浙江大学学报(工学版), 2016, 50(6): 1155-1159.
[8] 罗林, 苏宏业, 班岚. Dirichlet过程混合模型在非线性过程监控中的应用[J]. 浙江大学学报(工学版), 2015, 49(11): 2230-2236.
[9] 汪宏浩, 王慧泉, 金仲和. 基于增量链接的可回滚星载软件在轨更新方法[J]. 浙江大学学报(工学版), 2015, 49(4): 724-731.
[10] 王继奎, 李少波. 基于真值发现的冲突数据源质量评价算法[J]. 浙江大学学报(工学版), 2015, 49(2): 303-318.
[11] 蔡华林,陈刚,陈珂. 多类别复合资源的空间匹配[J]. 浙江大学学报(工学版), 2015, 49(1): 69-78.
[12] 俞东进,殷昱煜,吴萌萌,刘愉. 基于混合协同过滤的Web服务QoS预测方法[J]. 浙江大学学报(工学版), 2014, 48(11): 2039-2045.
[13] 柯海丰,应晶. 基于R-ELM的实时车牌字符识别技术[J]. 浙江大学学报(工学版), 2014, 48(7): 1209-1216.
[14] 刘智慧, 张泉灵. 大数据技术研究综述[J]. 浙江大学学报(工学版), 2014, 48(6): 957-972.
[15] 柯海丰,应晶. 基于R-ELM的实时车牌字符识别技术[J]. J4, 2014, 48(2): 0-0.