Abstract
Metamorphic testing (MT) is an effective testing technique having a broad range of applications. One key task for MT is the identification of metamorphic relations (MRs), which is a fundamental mechanism in MT and is critical to the automation of MT. Prior studies have proposed approaches for predicting MRs (PMR). One major idea behind these PMR approaches is to represent program source code information via manually designed code features and then to apply machine-learning–based classifiers to automatically predict whether a specific MR can be applied on the target program. Nevertheless, the human-involved procedure of selecting and extracting code features is costly, and it may not be easy to obtain sufficiently comprehensive features for representing source code. To overcome this limitation, in this study, we explore and evaluate the effectiveness of code representation learning techniques for PMR. By applying neural code representation models for automatically mapping program source code to code vectors, the PMR procedure can be boosted with learned code representations. We develop 32 PMR instances by, respectively, combining 8 code representation models with 4 typical classification models and conduct an extensive empirical study to investigate the effectiveness of code representation learning techniques in the context of MR prediction. Our findings reveal that code representation learning can positively contribute to the prediction of MRs and provide insights into the practical usage of code representation models in the context of MR prediction. Our findings could help researchers and practitioners to gain a deeper understanding of the strength of code representation learning for PMR and, hence, pave the way for future research in deriving or extracting MRs from program source code.
| Original language | English |
|---|---|
| Article number | e1889 |
| Journal | Software Testing Verification and Reliability |
| Volume | 34 |
| Issue number | 6 |
| DOIs | |
| Publication status | Published - Sept 2024 |
| Externally published | Yes |
Free Keywords
- deep learning
- predicting metamorphic relation
- source code representation
ASJC Scopus subject areas
- Software
- Safety, Risk, Reliability and Quality
Fingerprint
Dive into the research topics of 'Boosting Metamorphic Relation Prediction via Code Representation Learning: An Empirical Study'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver