Back to Search View Original Cite This Article

Abstract

<jats:p>This paper is devoted to adapting the Metamorphic Testing-as-a-Service (MTaaS) architectural pattern for the Java programming language, based on its language-specific characteristics. Metamorphic testing is a promising approach to verifying software systems in cases where constructing a classical test oracle is difficult or impossible. However, the practical adoption of metamorphic testing in software development processes is often complicated due to the need to implement metamorphic scenarios manually, the requirement for a significant amount of auxiliary code, and weak integration with existing software architectures.The paper analyzes existing approaches to the implementation of metamorphic testing and the MTaaS architectural pattern and substantiates the choice of an annotation-based approach as the most suitable for the Java ecosystem. The proposed method is based on the use of annotations and annotation processing mechanisms for the declarative specification of metamorphic relations, automatic collection of their components, and generation of a formal specification for subsequent execution of metamorphic checks.A prototype implementation of MTaaS for Java was developed and experimentally compared with a manual implementation of metamorphic testing to evaluate the effectiveness of the proposed approach. The experiments were conducted using two problems of different complexity: Text Normalization Pipeline and Convex Hull. The comparison was performed using object-oriented code quality metrics, including LOC, WMC, CBO, RFC, LCOM, and NOM.The experimental results showed that for problems with a small number of metamorphic relations, the annotation-based MTaaS approach provides moderate improvements in code quality characteristics. At the same time, for complex problems involving a large number of independent metamorphic scenarios, the use of MTaaS makes it possible to significantly reduce code size, decrease complexity and coupling, and eliminate a substantial portion of auxiliary glue code.</jats:p>

Show More

Keywords

metamorphic mtaas code testing approach

Related Articles