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

有效的数据流测试数据生成方法

Towards Efficient Data-flow Test Data Generation

Ting Su, Chengyu Zhang, Yichen Yan, Lingling Fan, Geguang Pu, Yang Liu, Zhoulai Fu, Zhendong Su

摘要:

数据流测试(DFT)旨在通过关注变量接收值的点和这些值被使用的点来检测潜在的数据交互异常。此类测试目标称为\emph{def-use pairs}。然而,DFT的复杂性仍然困扰着测试人员在实践中。为了解决这个问题,我们引入了一个混合测试框架的数据流为基础的测试生成:(1)我们的框架的核心是符号执行(SE),增强了一种新的引导路径探索策略,以提高测试性能;和(2)我们系统地铸造DFT作为可达性检查在软件模型检验(SMC),以补充SE,产生实际的DFT结合两种技术的优势。我们实现了我们的框架,C程序上的国家的最先进的符号执行引擎KLEE和实例化与三个不同的软件模型检查器。通过对33个开源和工业程序中的28,354个def-use对的测试结果表明:(1)与现有的搜索策略相比,本文提出的基于SE的方法在测试时间上可以将DFT性能提高15 $\sim$ 48%;(2)通过消除不可行的测试目标,我们的组合方法可以进一步减少测试时间20.1PDMATHABMN 93.6%,并提高数据流覆盖率27.8PDMATHABMN $\sim$ 45.2%。与单独使用SMC的方法相比,我们的组合方法还可以减少测试时间19.9 $\sim$ 23.8%,并提高数据流覆盖率7 $\sim$ 10%。这种组合方法还可以对每个组件进行交叉检查,以获得可靠和稳健的测试结果。我们已经公开了我们的测试框架和基准,以促进未来的研究。

英文摘要:

Data-flow testing (DFT) aims to detect potential data interaction anomalies by focusing on the points at which variables receive values and the points at which these values are used. Such test objectives are referred as \emph{def-use pairs}. However, the complexity of DFT still overwhelms the testers in practice. To tackle this problem, we introduce a hybrid testing framework for data-flow based test generation: (1) The core of our framework is symbolic execution (SE), enhanced by a novel guided path exploration strategy to improve testing performance; and (2) we systematically cast DFT as reachability checking in software model checking (SMC) to complement SE, yielding practical DFT that combines the two techniques' strengths. We implemented our framework for C programs on top of the state-of-the-art symbolic execution engine KLEE and instantiated with three different software model checkers. Our evaluation on the 28,354 def-use pairs collected from 33 open-source and industrial program subjects shows (1) our SE-based approach can improve DFT performance by 15$\sim$48% in terms of testing time, compared with existing search strategies; and (2) our combined approach can further reduce testing time by 20.1$\sim$93.6%, and improve data-flow coverage by 27.8$\sim$45.2% by eliminating infeasible test objectives. Compared with the SMC-based approach alone, our combined approach can also reduce testing time by 19.9$\sim$23.8%, and improve data-flow coverage by 7$\sim$10%. This combined approach also enables the cross-checking of each component for reliable and robust testing results. We have made our testing framework and benchmarks publicly available to facilitate future research.

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

↑