A test oracle determines whether a system behaves correctly for a given input. Automatic testing techniques rely on an automated test oracle to test the system without user interaction. Important families of automated test oracles include Differential Testing and Metamorphic Testing, which are both black-box approaches; that is, they provide a test oracle that is oblivious to the system's internals. In this work, we propose Intramorphic Testing as a white-box methodology to tackle the test oracle problem. To realize an Intramorphic Testing approach, a modified version of the system is created, for which, given a single input, a test oracle can be provided that relates the output of the original and modified systems. As a concrete example, by replacing a greater-equals operator in the implementation of a sorting algorithm with smaller-equals, it would be expected that the output of the modified implementation is the reverse output of the original implementation. In this paper, we introduce the methodology and illustrate it via a set of use cases.
翻译:测试器将决定一个系统对给定输入是否正确。 自动测试技术依靠一个自动测试器来测试系统而不与用户互动。 自动测试器的重要组合包括区别测试和变形测试, 两者都是黑箱方法; 也就是说, 它们提供了一种系统内部不注意的测试器。 在这项工作中, 我们提议, 定型测试是解决测试器问题的一种白箱方法。 为了实现一种不透明测试方法, 创建了系统的一个修改版本, 根据一个单一的输入, 可以提供一种与原始和修改后的系统输出相关的测试器。 具体的例子就是, 在使用一个较小等值的排序算法时, 替换一个更平等的操作器, 从而预计修改后实施过程的输出是最初实施的反向输出。 在本文中, 我们引入了该方法, 并通过一组使用案例来说明它 。