Predicting metamorphic relations for testing scientific software: a machine learning approach using graph kernels. (16th November 2015) - Kanewala, Upulee
Summary: Comprehensive, automated software testing requires an oracle to check whether the output produced by a test case matches the expected behaviour of the programme. But the challenges in creating suitable oracles limit the ability to perform automated testing in some programmes, and especially in scientific software. Metamorphic testing is a method for automating the testing process for programmes without test oracles. This technique operates by checking whether the programme behaves according to properties called metamorphic relations . A metamorphic relation describes the change in output when the input is changed in a prescribed way. Unfortunately, finding the metamorphic relations satisfied by a programme or function remains a labour‐intensive task, which is generally performed by a domain expert or a programmer. In this work, we propose a machine learning approach for predicting metamorphic relations that uses a graph‐based representation of a programme to represent control flow and data dependency information. In earlier work, we found that simple features derived from such graphs provide good performance. An analysis of the features used in this earlier work led us to explore the effectiveness of several representations of those graphs using the machine learning framework of graph kernels, which provide various ways of measuring similarity between graphs. Our results show that a graph kernel that evaluates the contribution of all paths in the graph has the best accuracy and that control flow information is more useful than data dependency information. The data used in this study are available for download athttp://www.cs.colostate.edu/saxs/MRpred/functions.tar.gz to help researchers in further development of metamorphic relation prediction methods. Copyright © 2015 John Wiley & Sons, Ltd. Abstract : Challenges in creating suitable oracles limit the ability to perform automated testing in scientific software. Metamorphic testing is a method for automating the testing process for programmes without test oracles. However, finding the metamorphic relations satisfied by a programme remains a labour‐intensive task. Here, we propose a machine learning approach for predicting metamorphic relations that uses a graph‐based representation of a programme. Our results show that a graph kernel that uses all paths in the graph has the best prediction accuracy.