作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (19): 90-92. doi: 10.3969/j.issn.1000-3428.2010.19.031

• 软件技术与数据库 • 上一篇    下一篇

多核计算机上并行生成类测试用例

吴惜华,钟 诚,莫英红,唐金辉   

  1. (广西大学计算机与电子信息学院,南宁 530004)
  • 出版日期:2010-10-05 发布日期:2010-09-27
  • 作者简介:吴惜华(1983-),女,硕士研究生,主研方向:高可信软件技术;钟 诚,教授、博士、博士生导师;莫英红、唐金辉,硕士研究生
  • 基金资助:
    广西科学基金资助项目(桂科自0728033);广西研究生教育创新计划基金资助项目;广西高校人才小高地建设创新团队基金资助项目(桂教人[2007]7号)

Generating Class Test Case in Parallel on Multi-core Computers

WU Xi-hua, ZHONG Cheng, MO Ying-hong, TANG Jin-hui   

  1. (School of Computer, Electronics and Information, Guangxi University, Nanning 530004, China)
  • Online:2010-10-05 Published:2010-09-27

摘要: 通过类的数据流分析计算出实例变量的“定义-使用”对信息以及成员函数的前置和后置条件,利用类的继承多态性对被测试类进行预处理。在JPF中设置搜索环境,将测试用例生成问题简化成模型检测中寻找反例的问题,提出一种在多核计算机上实现的线程级并行生成类测试用例的方法。实验结果表明,该方法可以减少测试生成所需的状态数和运行时间,算法可使用的处理核心越多、测试生成所需的时间越少。

关键词: 类测试, 用例生成, 多线程, 多核计算机, 并行处理

Abstract: The definition-use pair for each instance variable and the post conditions and preconditions for each member function are computed by the class data flow analysis. The class to be tested is preprocessed by the inheritance and the polymorphism of the class. The search environment of Java PathFinder(JPF) is configured, and the problem of generating test case is transformed into the one of finding the counter example in model check. A method to generate the class test case in parallel with multi-threading is presented on multi-core computers. Experimental results show that the algorithm can remarkably reduce the required states and run time of the test case generation, and spends the less time with more processing cores used.

Key words: class test, case generation, multi-thread, multi-core computer, parallel processing

中图分类号: