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

优化变形关系以降低测试成本

Prioritization of Metamorphic Relations to reduce the cost of testing

Madhusudan Srinivasan, Upulee Kanewala

摘要:

oracle是一种机制,用于确定程序执行测试用例的输出是否正确。对于机器学习程序,这样的预言是不可用的或太难应用。变形测试是一种使用变形关系的测试方法,变形关系是被测软件的必要属性,有助于验证程序的正确性。变形关系的优先级有助于降低变形测试的成本[1]。然而,基于代码覆盖率对变形关系进行优先级排序对于为机器学习程序对MR进行优先级排序通常不是有效的,因为机器学习模型的决策逻辑是从训练数据中学习的,并且可以利用单个测试输入容易地实现100%代码覆盖率。为此,在这项工作中,我们提出了一个具有成本效益的方法的基础上的多样性的来源和后续数据集的优先级的变形关系的机器学习程序。我们表明,所提出的基于数据多样性的优先级排序方法相比,基于代码覆盖率的方法,故障检测的有效性提高了40%,并减少了29%的时间来检测故障时相比,随机执行的MR。总体而言,我们的方法导致节省时间和成本在测试过程中。

英文摘要:

An oracle is a mechanism to decide whether the outputs of the program for the executed test cases are correct. For machine learning programs, such oracle is not available or too difficult to apply. Metamorphic testing is a testing approach that uses metamorphic relations, which are necessary properties of the software under test to help verify the correctness of a program. Prioritization of metamorphic relations helps to reduce the cost of metamorphic testing [1]. However, prioritizing metamorphic relations based on code coverage is often not effective for prioritizing MRs for machine learning programs, since the decision logic of a machine learning model is learned from training data, and 100% code coverage can be easily achieved with a single test input. To this end, in this work, we propose a cost-effective approach based on diversity in the source and follow-up data set to prioritize metamorphic relations for machine learning programs. We show that the proposed data diversity-based prioritization approach increase the fault detection effectiveness by up to 40% when compared to the code coverage-based approach and reduce the time taken to detect a fault by 29% when compared to random execution of MRs. Overall, our approach leads to saving time and cost during testing.

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

↑