Towards Generating Executable Metamorphic Relations Using Large Language Models
Seung Yeob Shin, Fabrizio Pastore, Domenico Bianculli and, Alexandra Baicoianu

TL;DR
This paper introduces a novel method leveraging large language models to automatically generate executable metamorphic relations from requirements, reducing manual effort and enhancing the practicality of metamorphic testing.
Contribution
It presents a few-shot prompting approach for LLMs to derive executable metamorphic relations directly from requirements and API specs, streamlining the MT process.
Findings
Generated MRs are comprehensible and relevant for testing.
The approach shows promising accuracy in generating EMRs for web applications.
Survey results support the feasibility of the method in industrial contexts.
Abstract
Metamorphic testing (MT) has proven to be a successful solution to automating testing and addressing the oracle problem. However, it entails manually deriving metamorphic relations (MRs) and converting them into an executable form; these steps are time-consuming and may prevent the adoption of MT. In this paper, we propose an approach for automatically deriving executable MRs (EMRs) from requirements using large language models (LLMs). Instead of merely asking the LLM to produce EMRs, our approach relies on a few-shot prompting strategy to instruct the LLM to perform activities in the MT process, by providing requirements and API specifications, as one would do with software engineers. To assess the feasibility of our approach, we conducted a questionnaire-based survey in collaboration with Siemens Industry Software, a worldwide leader in providing industry software and services,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSemantic Web and Ontologies · Natural Language Processing Techniques · Topic Modeling
