高级检索
    严俊, 郭涛, 阮辉, 玄跻峰. JUTA: 一个Java自动化单元测试工具[J]. 计算机研究与发展, 2010, 47(10): 1840-1848.
    引用本文: 严俊, 郭涛, 阮辉, 玄跻峰. JUTA: 一个Java自动化单元测试工具[J]. 计算机研究与发展, 2010, 47(10): 1840-1848.
    Yan Jun, Guo Tao, Ruan Hui, Xuan Jifeng. JUTA: An Automated Unit Testing Framework for Java[J]. Journal of Computer Research and Development, 2010, 47(10): 1840-1848.
    Citation: Yan Jun, Guo Tao, Ruan Hui, Xuan Jifeng. JUTA: An Automated Unit Testing Framework for Java[J]. Journal of Computer Research and Development, 2010, 47(10): 1840-1848.

    JUTA: 一个Java自动化单元测试工具

    JUTA: An Automated Unit Testing Framework for Java

    • 摘要: 描述了一个Java自动化的单元测试工具JUTA.JUTA首先调用工具Soot解析单个Java方法的源码,并将源码解析成一个控制流图.在此基础上,采用符号执行的方法分析控制流图上的路径.工具能够自动地产生满足覆盖率标准的程序的测试用例.这种方法产生的所有测试用例都是可执行的,并且一般来说具有较小的测试用例数.如果用户能够合理地给出描述程序错误的断言,框架JUTA能够自动地检查源码中部分特定类型的错误.实验结果表明工具对Java单元代码的动态测试和静态测试均能在可接受的时间内给出有效的结果.

       

      Abstract: 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.

       

    /

    返回文章
    返回