arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.06433cs.SEcs.AIcs.CLcs.CV
收藏

逆向形态测试:测试预言问题的一种新方法

Retromorphic Testing: A New Approach to the Test Oracle Problem

The Chinese University of Hong Kong, Shenzhen (CUHK-Shenzhen)(香港中文大学(深圳))

Boxi Yu, Qiuyang Mang, Qingshuo Guo, Pinjia He

AI总结:

提出逆向形态测试,一种基于反函数概念的黑盒测试方法,通过正向与反向程序的双程序结构验证输入与输出关系,解决测试预言问题。

摘要:

测试预言是用于评估软件输出与给定输入集下预期行为之间一致性的标准或机制。在自动化测试中,黑盒技术因其在测试预言构建中的非侵入性而广泛使用,包括差分测试和蜕变测试等著名方法。受数学中反函数概念的启发,我们提出了逆向形态测试,一种新颖的黑盒测试方法。它利用一个辅助程序与待测程序相结合,建立由正向程序和反向程序组成的双程序结构。输入数据首先由正向程序处理,然后其程序输出通过反向程序被还原为原始输入格式。特别地,辅助程序可以作为正向或反向程序运行,从而产生不同的测试模式。该过程最终通过检查初始输入与输入域内变换后输出之间的关系来得出结论。例如,为了测试正弦函数$\sin(x)$的实现,我们可以使用其反函数$\arcsin(x)$,并验证等式$x = \sin(\arcsin(x)+2kπ), \forall k \in \mathbb{Z}$。除了逆向形态测试的高层概念外,本文还介绍了其三种测试模式,并提供了跨多种程序(包括算法、传统软件和AI应用)的示例用例。

英文摘要:

A test oracle serves as a criterion or mechanism to assess the correspondence between software output and the anticipated behavior for a given input set. In automated testing, black-box techniques, known for their non-intrusive nature in test oracle construction, are widely used, including notable methodologies like differential testing and metamorphic testing. Inspired by the mathematical concept of inverse function, we present Retromorphic Testing, a novel black-box testing methodology. It leverages an auxiliary program in conjunction with the program under test, which establishes a dual-program structure consisting of a forward program and a backward program. The input data is first processed by the forward program and then its program output is reversed to its original input format using the backward program. In particular, the auxiliary program can operate as either the forward or backward program, leading to different testing modes. The process concludes by examining the relationship between the initial input and the transformed output within the input domain. For example, to test the implementation of the sine function $\sin(x)$, we can employ its inverse function, $\arcsin(x)$, and validate the equation $x = \sin(\arcsin(x)+2kπ), \forall k \in \mathbb{Z}$. In addition to the high-level concept of Retromorphic Testing, this paper presents its three testing modes with illustrative use cases across diverse programs, including algorithms, traditional software, and AI applications.

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

↑