Exploring a Test Data-Driven Method for Selecting and Constraining Metamorphic Relations
Alejandra Duque-Torres, Dietmar Pfahl, Claus Klammer, Stefan Fischer
TL;DR
This work tackles the challenge of selecting and constraining metamorphic relations (MRs) for metamorphic testing without relying on labeled applicability data. It introduces MetaTrimmer, a three-step, test data-driven workflow that uses fuzz-generated inputs, MT processing with MR transformations, and manual constraint derivation to identify when MRs apply and to delineate input spaces where they hold. Compared to PMR, MetaTrimmer avoids labeled datasets and accounts for data-dependent MR applicability, showing promising MR selection results (including 100% compliance for GT=1 cases) and the ability to generate actionable MR constraints from mixed cases. The approach demonstrates domain-agnostic potential and integration with fuzzing, offering practical benefits for MR coverage and test suite optimization, while acknowledging the need for automation and broader validation across domains.
Abstract
Identifying and selecting high-quality Metamorphic Relations (MRs) is a challenge in Metamorphic Testing (MT). While some techniques for automatically selecting MRs have been proposed, they are either domain-specific or rely on strict assumptions about the applicability of a pre-defined MRs. This paper presents a preliminary evaluation of MetaTrimmer, a method for selecting and constraining MRs based on test data. MetaTrimmer comprises three steps: generating random test data inputs for the SUT (Step 1), performing test data transformations and logging MR violations (Step 2), and conducting manual inspections to derive constraints (Step 3). The novelty of MetaTrimmer is its avoidance of complex prediction models that require labeled datasets regarding the applicability of MRs. Moreover, MetaTrimmer facilitates the seamless integration of MT with advanced fuzzing for test data generation. In a preliminary evaluation, MetaTrimmer shows the potential to overcome existing limitations and enhance MR effectiveness.
