A Replication Study on Predicting Metamorphic Relations at Unit Testing Level

05/31/2022
by   Alejandra Duque-Torres, et al.
0

Metamorphic Testing (MT) addresses the test oracle problem by examining the relations between inputs and outputs of test executions. Such relations are known as Metamorphic Relations (MRs). In current practice, identifying and selecting suitable MRs is usually a challenging manual task, requiring a thorough grasp of the SUT and its application domain. Thus, Kanewala et al. proposed the Predicting Metamorphic Relations (PMR) approach to automatically suggest MRs from a list of six pre-defined MRs for testing newly developed methods. PMR is based on a classification model trained on features extracted from the control-flow graph (CFG) of 100 Java methods. In our replication study, we explore the generalizability of PMR. First, we rebuild the entire preprocessing and training pipeline and repeat the original study in a close replication to verify the reported results and establish the basis for further experiments. Second, we perform a conceptual replication to explore the reusability of the PMR model trained on CFGs from Java methods in the first step for functionally identical methods implemented in Python and C++. Finally, we retrain the model on the CFGs from the Python and C++ methods to investigate the dependence on programming language and implementation details. We were able to successfully replicate the original study achieving comparable results for the Java methods set. However, the prediction performance of the Java-based classifiers significantly decreases when applied to functionally equivalent Python and C++ methods despite using only CFG features to abstract from language details. Since the performance improved again when the classifiers were retrained on the CFGs of the methods written in Python and C++, we conclude that the PMR approach can be generalized, but only when classifiers are developed starting from code artefacts in the used programming language.

READ FULL TEXT

page 1

page 3

research
05/31/2023

An Empirical Study of Fault Localization in Python Programs

Despite its massive popularity as a programming language, especially in ...
research
05/31/2022

Using Source Code Metrics for Predicting Metamorphic Relations at Method Level

Metamorphic testing (TM) examines the relations between inputs and outpu...
research
04/13/2022

Lessons learned from replicating a study on information-retrieval based test case prioritization

Objective: In this study, we aim to replicate an artefact-based study on...
research
08/01/2020

The test set for the TransCoder system

The TransCoder system translates source code between Java, C++, and Pyth...
research
11/06/2021

Automatic Program Repair with OpenAI's Codex: Evaluating QuixBugs

OpenAI's Codex, a GPT-3 like model trained on a large code corpus, has m...
research
03/23/2021

What is the Vocabulary of Flaky Tests? An Extended Replication

Software systems have been continuously evolved and delivered with high ...
research
09/30/2015

Model-independent comparison of simulation output

Computational models of complex systems are usually elaborate and sensit...

Please sign up or login with your details

Forgot password? Click here to reset