Software testing is difficult to automate, especially in programs which have no oracle, or method of determining which output is correct. Metamorphic testing is a solution this problem. Metamorphic testing uses metamorphic relations to define test cases and expected outputs. A large amount of time is needed for a domain expert to determine which metamorphic relations can be used to test a given program. Metamorphic relation prediction removes this need for such an expert. We propose a method using semi-supervised machine learning to detect which metamorphic relations are applicable to a given code base. We compare this semi-supervised model with a supervised model, and show that the addition of unlabeled data improves the classification accuracy of the MR prediction model.
A second paper by studies the dynamic inference of MRs @cite_0 . The authors built a tool to implement their algorithm. The algorithm works by first defining a set of MRs, which they call transformers: "multiplier", "adder", "negator", "shuffler", and "reverser". For each transformer in the set, a function is executed with and without the transformation applied. The results are compared to see if the functions exhibit a metamorphic property. In this way, they can predict which MRs apply to a given function.
@cite_0
1979328741
Metamorphic testing is an advanced technique to test programs without a true test oracle such as machine learning applications. Because these programs have no general oracle to identify their correctness, traditional testing techniques such as unit testing may not be helpful for developers to detect potential bugs. This paper presents a novel system, K abu , which can dynamically infer properties of methods' states in programs that describe the characteristics of a method before and after transforming its input. These Metamorphic Properties (MPs) are pivotal to detecting potential bugs in programs without test oracles, but most previous work relies solely on human effort to identify them and only considers MPs between input parameters and output result (return value) of a program or method. This paper also proposes a testing concept, Metamorphic Differential Testing (MDT). By detecting different sets of MPs between different versions for the same method, K abu reports potential bugs for human review. We have performed a preliminary evaluation of K abu by comparing the MPs detected by humans with the MPs detected by K abu . Our preliminary results are promising: K abu can find more MPs than human developers, and MDT is effective at detecting function changes in methods.