Syntax‐based metamorphic relation prediction via the bagging framework
Yuyu Yin,Jiajie Ruan,Youhuizi Li,Yu Li,Zhijin Pan
DOI: https://doi.org/10.1111/exsy.12902
IF: 3.3
2021-12-15
Expert Systems
Abstract:Software testing is an indispensable part of the software engineering industry, which guarantees product reliability and safety. Traditional testing approaches face the testing Oracle problem, they are difficult to construct the expected outputs with the increasing of program complexity. As a result, metamorphic testing, which tests the program by examining the relationship between the execution results, is proposed. However, existing manual metamorphic relation construction requires huge effects of domain experts, and automatic methods are unstable and inefficient due to the insufficient software feature mining. Hence, we proposed a multi‐dimensional program structure‐based metamorphic relation prediction approach, which is composed of feature extraction and prediction model building. In the feature extraction stage, the testing program is converted to multiple intermediate structures (such as control flow graphs and abstract syntax trees) to explore its features. In the prediction model building stage, the extracted feature set is used as the training set, and a novel semi‐supervised support vector machine‐bagging‐K‐nearest neighbors algorithm is designed to train the prediction model. Besides, a two‐phase hybrid granularity search algorithm is proposed to improve the prediction performance by selecting the optimal number of weak classifiers. Compared with existing approaches, our proposed model can improve the accuracy by around 14%.
computer science, artificial intelligence, theory & methods