arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1011.0594cs.SE
收藏

异维数组和可变迭代次数循环程序测试数据自动生成的启发式方法

Heuristic Approach of Automated Test Data Generation for Program having Array of Different Dimensions and Loops with Variable Number of Iteration

Hitesh Tahbildar, Bichitra Kalita

摘要:

通常,程序执行的大部分时间都花在循环上。自动化的测试数据生成特别关注循环以获得更好的覆盖率。对于具有可变迭代次数和可变长度数组的循环的程序,自动生成测试数据是一个具有挑战性的问题。这是因为对于某些编程结构(如归并排序),路径的数量可能会随着数组大小的增加而呈指数级增加。我们提出了一种方法,发现启发式不同类型的编程结构与循环和数组。线性搜索、冒泡排序、合并排序和矩阵乘法程序都包含在其中,试图突出单循环、可变长度数组和一维和二维的数组嵌套循环之间的执行差异。我们已经使用了两个参数/算法来预测生成自动化测试数据所需的最小迭代次数。它们是最长路径电平(kL)和饱和电平(kS)。我们的工作程序包括在初级水平的源代码的仪器,其次是应用程序的随机输入,直到所有可行的路径或所有路径具有最长的路径被收集。但是,通过使用过滤器可以避免重复路径。我们的测试数据是覆盖每个可行路径的随机数。

英文摘要:

Normally, program execution spends most of the time on loops. Automated test data generation devotes special attention to loops for better coverage. Automated test data generation for programs having loops with variable number of iteration and variable length array is a challenging problem. It is so because the number of paths may increase exponentially with the increase of array size for some programming constructs, like merge sort. We propose a method that finds heuristic for different types of programming constructs with loops and arrays. Linear search, Bubble sort, merge sort, and matrix multiplication programs are included in an attempt to highlight the difference in execution between single loop, variable length array and nested loops with one and two dimensional arrays. We have used two parameters/heuristics to predict the minimum number of iterations required for generating automated test data. They are longest path level (kL) and saturation level (kS). The proceedings of our work includes the instrumentation of source code at the elementary level, followed by the application of the random inputs until all feasible paths or all paths having longest paths are collected. However, duplicate paths are avoided by using a filter. Our test data is the random numbers that cover each feasible path.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑