arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2405.17019cs.SE
收藏

利用计算学习理论界定随机测试集规模的上界

Bounding Random Test Set Size with Computational Learning Theory

Neil Walkinshaw, Michael Foster, Jose Miguel Rojas, Robert M Hierons

AI总结:

本研究将计算学习理论中的概率方法应用于随机测试场景,仅依据源代码覆盖目标数量即可得出达到测试充分性所需测试数的上界,并在Java单元和自动驾驶系统上完成验证。

摘要:

随机测试方法通过随机生成输入,或从某个预定义的运行剖面中随机选择输入来开展测试。在这类测试及其他测试场景中,一个长期存在的问题是:我们何时可以停止测试?到什么时候我们才能确定,以这种方式执行更多测试不会再发现此前未测试过(且可能存在缺陷)的软件行为?这与机器学习中“需要多少训练样本才能推断出准确模型”的问题类似。本文中,我们展示了机器学习中用于解答该问题的概率方法(源自计算学习理论)如何应用于测试场景。这让我们能够得出达到给定充分性水平所需测试数量的上界。我们是首个仅通过了解源代码中的覆盖目标数量(如代码行数)就能实现这一点的研究,无需观测样本测试执行过程。我们在大量Java单元以及一个自动驾驶系统上验证了该上界的有效性。

英文摘要:

Random testing approaches work by generating inputs at random, or by selecting inputs randomly from some pre-defined operational profile. One long-standing question that arises in this and other testing contexts is as follows: When can we stop testing? At what point can we be certain that executing further tests in this manner will not explore previously untested (and potentially buggy) software behaviors? This is analogous to the question in Machine Learning, of how many training examples are required in order to infer an accurate model. In this paper we show how probabilistic approaches to answer this question in Machine Learning (arising from Computational Learning Theory) can be applied in our testing context. This enables us to produce an upper bound on the number of tests that are required to achieve a given level of adequacy. We are the first to enable this from only knowing the number of coverage targets (e.g. lines of code) in the source code, without needing to observe a sample test executions. We validate this bound on a large set of Java units, and an autonomous driving system.

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

↑