期刊文献+

一种基于分支覆盖的测试数据自动生成算法 被引量:2

Automatic Test Data Generation Algorithm on Branch Coverage
下载PDF
导出
摘要 通过构造新的程序流图,利用Fibonacci法优化选取路径,为指定的分支生成测试数据。提出了路径测试数据生成代价的概念,并给出了代价的计算方法。当所选路径的分支谓词均为线性表达式时,直接求解线性约束集即可生成测试数据,或判定路径不可行;当分支谓词含有非线性表达式时,利用均差近似导数将非线性函数线性化,通过简单的迭代,亦能容易生成测试数据或判定路径在很大程度上不可行。若所选路径不可行或在很大程度上不可行,则选取新的路径,重复以上过程,直至求出所期望的数据,或无新的路径被选取,给定分支不可达。实例和实验表明,算法可行、有效。 In order to generate test data for a given branch, a new program flow graph is constructed, and Fibonacci method is used to optimize the path selection. The conception and calculation to path-based test data generation complexity is presented. If all branch predicates on the selected path are linear expression, the linear constrain set is constructed and solved to generate test data, otherwise the path can be determined infeasible. Else, the derivatives of a predicate function is approximated by its divided difference, and the nonlinear function is linearized. The test data can also be generated by simple iteration or the path is determined as likely infeasible. If the selected path is infeasible or likely infeasible, a new path is selected. The process above is repeated until the desired test data is obtained or there is no new path to be selected, and the given branch is infeasible. Example and experiment show that the algorithm is feasible and effective.
出处 《计算机科学》 CSCD 北大核心 2006年第12期261-264,273,共5页 Computer Science
基金 国家863高技术研究发展计划基金项目(2003AA1Z2610)。
关键词 分支覆盖 谓词函数 线性算术表示 Branch coverage,Predicate function,I,inear arithmetic representation
  • 相关文献

参考文献11

  • 1Jiang Tai-Ying,I.iu Chien-Nan Jimmy,Jou Jing-Yang. An observability measure to enhance statement coverage metric for proper evaluation of verification eompleteness[A]. In: Proceedings of the ASP- Design Automation Conference, 2005[C]. Asia and South Pacific, 2005. 323-326
  • 2Gupta N, Mathur A P, Sofia M L. Generating test data for branch coverage [A]. In: Automated Software Engineering,2000. Proceedings ASE 2000[C]. The Fifteenth IEEE International Conference on 11-15 Sept. 2000. 219-227
  • 3Sze S K S, Lyu M R. ATACOBOL-a COBOL test coverage analysis tool and its applications[A]. In: Proceedings 11th International Symposium of Software Reliability Engineering [C],2000, 327-335
  • 4单锦辉,王戟,齐治昌,吴建平.Improved Method to Generate Path—Wise Test Data[J].Journal of Computer Science & Technology,2003,18(2):235-240. 被引量:3
  • 5陈继锋,朱利,沈钧毅,陈玲.一种基于路径的测试数据自动生成算法[J].控制与决策,2005,20(9):1065-1068. 被引量:5
  • 6Korel B. A Dynamic Approach of Test Data Generation[A]. In:Conference on Software Maintenance[C]. San Diego, 1990. 311-317
  • 7Ferguson R, Korel B. The Chaining Approach for Software Tesl Data Generation[J]. A CM Transactions on Software Engineering Methodology, 1996, 15(1): 63-86
  • 8Forgacs I,Hajnal A. An Applicable Test Data Generation Algorithm for Domain Errors[A]. In: Proceedings of the ACM/SIGSOFT International Symposium on Software Testing and Analysis[C]. Clearwater Beach, Florida, March 1998
  • 9Korel B. Automated Software Test Data Generation[J]. IEEE Transactions on Software Engineering, 1990, 16(8): 870-879
  • 10Gupta N, Mathur A P, Soffa M L. Automated Test Data Generation Using An Iterative Relaxation Method[A]. Proceedings of the 6th ACM SIGSOFT International Symposium on Foundations of Software Engineering[C]. Florida, United States,1998. 231-244

二级参考文献26

  • 1Clarke L A. A System to Generate Test Data and Symbolically Execute Programs[J]. IEEE Trans on Software Engineering, 1976, 16(8): 870-879.
  • 2DeMillo R, Offutt J. Constraint-based Automatic Test Data Generation[J]. IEEE Trans on Software Engineering, 1991, 17(9): 900-910.
  • 3Alberto Coen-Porisini, Giovanni Denaro, Carlo Ghezzi, et al. Using Symbolic Execution for Verifying Safety-critical Systems[J]. ACM SIGSOFT Software Engineering Notes, 2001, 26(5): 142-151.
  • 4Chen T Y, Tse T H, Zhou Z Q. Semi-proving: An Integrated Method Based on Global Symbolic Evaluation and Metamorphic Testing[J]. ACM SIGSOFT Software Engineering Notes, 2002, 27(4): 191-195.
  • 5Willem Visser, Corina S Pǎsǎreanu, Sarfraz Khurshid. Test Input Generation with Java PathFinder[J]. ACM SIGSOFT Software Engineering Notes, 2004, 29(4): 97-107.
  • 6Gallagher M J, Narasimhan VL. ADTEST: A Test Data Generation Suite for Ada Software Systems[J]. IEEE Trans on Software Engineering, 1997, 23(8): 473-484.
  • 7Korel B. Automated Software Test Data Generation [J]. IEEE Trans on Software Engineering, 1990, 16(8): 870-879.
  • 8Nguyen Tran Sy, Yves Deville. Consistency Techniques for Interprocedural Test Data Generation[J]. ACM SIGSOFT Software Engineering Notes, 2003, 28(5): 108-117.
  • 9Gupta N, Mathur A P, Soffa M L. Automated Test Data Generation Using an Iterative Relaxation Method[A]. Proc of the 6th ACM SIGSOFT Int Symposium on Foundations of Software Engineering[C]. Florida, 1998: 231-244.
  • 10Wegener J, Baresel A,Sthamer H. Evolutionary Test Environment for Automatic Structural Testing[J]. Information and Software Technology, 2001,43(14): 843-854.

共引文献6

同被引文献18

  • 1毛澄映,卢炎生.分支测试中测试路径用例的简化生成方法[J].计算机研究与发展,2006,43(2):321-328. 被引量:17
  • 2金虎,李志蜀,张磊,李宝林,李勇军.基于面向路径的遗传算法的测试用例自动生成[J].计算机工程,2007,33(3):21-23. 被引量:9
  • 3B. W. Kernighan, D. M. Ritchie. The C Programming Language[M]. Engtewood Cliffs, NJ: Prentice- Hall, 1978.
  • 4M. S. Hecht. Flow Analysis of Computer Programs [M]. New York: Elsevier North Holland, 1977.
  • 5A. Bertolino, M. Marre. Automatic generation of path covers based on the control flow analysis of computer programs[J]. IEEE Transactions on Software Engineering, 1994,20(12) : 885-899.
  • 6D. F. Yates, N. Malevris. Reducing the effects of infeasible paths in branch testing[J]. ACM SIGSOFT Soft. Eng. Notes,1989,14(8).-48-54.
  • 7A. Bertolino, R. Mirandola, E. Peciola. A case study in branch testing automation[J]. Journal of Systems and Software, 1997,38(1) :47-59.
  • 8Mansour N, Salame Jaffa M. Data Generation for Path Testing [J]. Software Quality Journal,2004,12:121-136.
  • 9Miller J,Reformat M, Zhang H. Automatic test data generation using genetic algorithm and program dependence graphs [J]. In formation and Software Technology, 2006,48 : 586-605.
  • 10Korel B. Automated software test data generation[J]. IEEE Trans on Software Engineering, 1990,16(8) :870-879.

引证文献2

二级引证文献9

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部