GenMorph: Automatically Generating Metamorphic Relations via Genetic Programming

IF 6.5 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Jon Ayerdi;Valerio Terragni;Gunel Jahangirova;Aitor Arrieta;Paolo Tonella
{"title":"GenMorph: Automatically Generating Metamorphic Relations via Genetic Programming","authors":"Jon Ayerdi;Valerio Terragni;Gunel Jahangirova;Aitor Arrieta;Paolo Tonella","doi":"10.1109/TSE.2024.3407840","DOIUrl":null,"url":null,"abstract":"Metamorphic testing is a popular approach that aims to alleviate the oracle problem in software testing. At the core of this approach are Metamorphic Relations (MRs), specifying properties that hold among multiple test inputs and corresponding outputs. Deriving MRs is mostly a manual activity, since their automated generation is a challenging and largely unexplored problem. This paper presents \n<sc>GenMorph</small>\n, a technique to automatically generate MRs for Java methods that involve inputs and outputs that are boolean, numerical, or ordered sequences. \n<sc>GenMorph</small>\n uses an evolutionary algorithm to search for \n<italic>effective</i>\n test oracles, i.e., oracles that trigger no false alarms and expose software faults in the method under test. The proposed search algorithm is guided by two fitness functions that measure the number of false alarms and the number of missed faults for the generated MRs. Our results show that \n<sc>GenMorph</small>\n generates effective MRs for 18 out of 23 methods (mutation score > 20%). Furthermore, it can increase \n<sc>Randoop</small>\n's fault detection capability in 7 out of 23 methods, and \n<sc>Evosuite</small>\n's in 14 out of 23 methods. When compared with \n<sc>AutoMR</small>\n, a state-of-the-art MR generator, \n<sc>GenMorph</small>\n also outperformed its fault detection capability in 9 out of 10 methods.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":null,"pages":null},"PeriodicalIF":6.5000,"publicationDate":"2024-03-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10542726/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Metamorphic testing is a popular approach that aims to alleviate the oracle problem in software testing. At the core of this approach are Metamorphic Relations (MRs), specifying properties that hold among multiple test inputs and corresponding outputs. Deriving MRs is mostly a manual activity, since their automated generation is a challenging and largely unexplored problem. This paper presents GenMorph , a technique to automatically generate MRs for Java methods that involve inputs and outputs that are boolean, numerical, or ordered sequences. GenMorph uses an evolutionary algorithm to search for effective test oracles, i.e., oracles that trigger no false alarms and expose software faults in the method under test. The proposed search algorithm is guided by two fitness functions that measure the number of false alarms and the number of missed faults for the generated MRs. Our results show that GenMorph generates effective MRs for 18 out of 23 methods (mutation score > 20%). Furthermore, it can increase Randoop 's fault detection capability in 7 out of 23 methods, and Evosuite 's in 14 out of 23 methods. When compared with AutoMR , a state-of-the-art MR generator, GenMorph also outperformed its fault detection capability in 9 out of 10 methods.
GenMorph:通过遗传编程自动生成变形关系
元测试是一种流行的方法,旨在缓解软件测试中的甲骨文问题。这种方法的核心是 "变形关系"(Metamorphic Relations,MRs),它规定了多个测试输入和相应输出之间的属性。由于自动生成 MRs 是一个极具挑战性的问题,而且在很大程度上尚未被探索,因此推导 MRs 主要是一项人工活动。本文介绍的 GenMorph 是一种为涉及布尔、数值或有序序列的输入和输出的 Java 方法自动生成 MR 的技术。GenMorph 使用进化算法搜索有效的测试谕令,即不会触发误报并能暴露被测方法中软件故障的谕令。所提出的搜索算法由两个适应度函数指导,这两个适应度函数分别用于测量误报数量和生成的磁共振漏检故障数量。结果表明,GenMorph 为 23 种方法中的 18 种生成了有效的 MR(突变分数大于 20%)。此外,它还能提高 23 种方法中 7 种方法的 Randoop 故障检测能力,以及 23 种方法中 14 种方法的 Evosuite 故障检测能力。与最先进的磁共振生成器 AutoMR 相比,GenMorph 在 10 种方法中的 9 种方法的故障检测能力也优于 AutoMR。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信