期刊文献+

JUTA:一个Java自动化单元测试工具 被引量:13

JUTA:An Automated Unit Testing Framework for Java
下载PDF
导出
摘要 描述了一个Java自动化的单元测试工具JUTA.JUTA首先调用工具Soot解析单个Java方法的源码,并将源码解析成一个控制流图.在此基础上,采用符号执行的方法分析控制流图上的路径.工具能够自动地产生满足覆盖率标准的程序的测试用例.这种方法产生的所有测试用例都是可执行的,并且一般来说具有较小的测试用例数.如果用户能够合理地给出描述程序错误的断言,框架JUTA能够自动地检查源码中部分特定类型的错误.实验结果表明工具对Java单元代码的动态测试和静态测试均能在可接受的时间内给出有效的结果. Testing is very important and time consuming in the development of high-quality software systems.This paper proposes an automatic testing tool JUTA for unit testing of Java programs.The approach is based on sharp analysis of the programs.JUTA firstly employs the Java optimization framework Soot to parse a single Java method into byte code and translates it into a control flow graph(CFG).It then performs depth-first or breadth-first search on the CFG to extract paths from it.Some techniques such as path length restriction are used to prevent path number explosion.Finally JUTA analyzes the paths based on the combination of symbolic execution and constraint solving.The goal of path analysis lies in two folds.It can generate a set of test cases satisfying the test criterion such as statement coverage.The test set typically has small number of test cases that are all executable.In addition to test generation for dynamic testing,it can also be used in static testing.JUTA can reveal certain kinds of errors from the source code automatically if the user provides proper assertions to describe the errors.The experimental results show that this tool is efficient for both dynamic and static testing.
出处 《计算机研究与发展》 EI CSCD 北大核心 2010年第10期1840-1848,共9页 Journal of Computer Research and Development
基金 国家自然科学基金项目(60903049) 国家"八六三"高技术研究发展计划基金项目(2009AA01Z148 2009AA010313) 中国科学院知识创新工程领域前沿项目(ISCAS2009-DR01)~~
关键词 Java单元测试 动态测试 静态测试 程序分析 符号执行 Java unit testing dynamic testing static testing program analysis symbolic execution
  • 相关文献

参考文献19

  • 1Zhu Hong,Hall P A V,May J H R.Software unit test coverage and adequacy[J].ACM Computer Survey,1997,29(4):366-427.
  • 2Zhang Jian,Wang Xiaoxu.A constraint solver and its application to path feasibility analysis[J].Int Journal of Software Engineering and Knowledge Engineering,2001,11(2):139-156.
  • 3Edvardsson J.A survey on automatic test data generation[C]//Proc of the 2nd Conf on Computer Science and Engineering in Linkping.Linkping:ECSEL,1999:21-28.
  • 4King J C.Symbolic execution and program testing[J].Communications of the ACM,1976,19(7):385-394.
  • 5Zhang Jian.Specification analysis and test data generation by solving Boolean combinations of numeric constraints[C]//Proc of the 1st Asia-Pacific Conf on Quality Software (APAQS).Piscataway,NJ:IEEE,2000:267-274.
  • 6Zhang Jian.Symbolic execution of program paths involving pointer and structure variables[C]//Proc of the 4th Int Conf on Quality Software (QSIC).Piscataway,NJ:IEEE,2004:87-92.
  • 7Sable Research Group.Soot:A Java optimization framework[CP/OL].[2010-01-01].http://www.sable.mcgill.ca/soot/tutorial/index.html.
  • 8Beizer B.Software testing techniques[M].New York:John Wiley & Sons,1989.
  • 9Wang H S,Hsu S R,Lin J C.A generalized optimal path-selection model for structural program testing[J].The Journal of Systems and Software,1989,10(1):55-63.
  • 10McCabe T J.A complexity measure[J].IEEE Trans on Software Engineering,1976,SE-2(4):308-320.

二级参考文献17

  • 1汪黎,杨学军,王戟,罗宇.操作系统内核程序函数执行上下文的自动检验[J].软件学报,2007,18(4):1056-1067. 被引量:5
  • 2Hoare C A R. The verifying compiler: A grand challenge for computing research. Journal of the ACM, 2003, 50(1): 63-69
  • 3Horwitz S. Precise flow-insensitive may-alias analysis is NP- hard. ACM Transactions on Programming Languages and Systems, 1997, 19(1): 1-6
  • 4Ball T, Rajamani S K. The SLAM project: Debugging system software via static analysis//Proeeedings of the 29th ACM Symposium on Principles of Programming Languages (POPL 2002). Portland, OR, USA, 2002:1-3
  • 5Lev-Ami T et al. Putting static analysis to work for verification: A case study//Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 2000). Portland, OR, USA, 2000:26-38
  • 6Zhang J, Wang X. A constraint solver and its application to path feasibility analysis. International Journal of Software Engineering and Knowledge Engineering, 2001, 11(2): 139- 156
  • 7Zhang J. Symbolic execution of program paths involving pointer and structure variables//Proceedings of the QSIC. Braunschweig, Germany, 2004:87-92
  • 8King J C. Symbolic execution and testing. Communications of the ACM, 1976, 19(7): 385-394
  • 9Yates D F, Malevris N. Reducing the effects of infeasible paths in branch testing. ACM SIGSOFT Software Engineering Notes, 1989, 14(8): 48-54
  • 10Ngo M N, Tan H B K. Heuristics-based infeasible path detection for dynamic test data generation. Information & Software Technology, 2008, 50(7-8): 641-655

共引文献35

同被引文献96

引证文献13

二级引证文献56

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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