Gotten automates the construction of Metamorphic Testing (MT) environments. It starts from a meta-model
that captures the concepts of a domain and a description of the domain execution environment. From these
artefacts, Gotten produces a tailored environment for defining and evaluating domain-specific Metamorphic
Relations (MRs), reporting test results in detail, and generating follow-up test cases through
search-based techniques.
Definition and execution of domain-specific metamorphic relations with mrDSL
Automated search-based generation of follow-up test cases with fowDSL
Generation of a complete MT environment from a domain meta-model and a description of its execution environment
Evaluation of MRs over sets of test cases, with detailed reporting of the results
Domain independence, demonstrated on cloud simulators, video streaming APIs, autonomous vehicles and finite automata
Metamorphic testing addresses the oracle problem. Instead of comparing the output of one execution with an
expected result, it checks relations that should hold among the inputs and outputs of several executions of
the system under test. However, constructing an MT environment for a new domain usually requires
substantial domain-specific development.
Gotten reduces this effort through model-driven engineering. Domain experts describe the domain and its
execution environment using models. Gotten then generates a tailored MT environment in which metamorphic
relations can be defined, executed, and analysed, while follow-up test cases can be generated automatically
through search-based optimisation.
See the Gotten environment in action.
Tool demo
Demonstration of the Gotten development environment.
Short introductory presentation of the Gotten environment.
From domain models to metamorphic testing results in five steps.
How Gotten works
1Model the domain
Users provide the meta-models that capture the domain concepts—for example, data centres and workloads in
the cloud computing domain—together with a description of the domain execution environment. This
environment includes the processor that runs the test cases, such as a simulator or an external
API. Gotten uses this information to generate an MT environment tailored to the domain.
2Define metamorphic relations with mrDSL
The generated environment provides a DSL called mrDSL for defining and executing MRs. An
mrDSL program declares the domain meta-models, model instance names, input features expressed through OCL,
output features, processor attributes, and the metamorphic relations to be evaluated.
metamodel datacentre "/sample.gotten/model/datac.ecore" with m1, m2
models "/sample.gotten/model/dcmodels"
metamodel workload "/sample.gotten/model/workload.ecore" with w1, w2
models "/sample.gotten/model/workloads"
datacentre input Features {
context DataCentre def: NNodes: Int = racks->collect(numBoards*board.nodesPerBoard)->sum()
context DataCentre def: CPU: Int = racks->collect(
numBoards*board.nodesPerBoard*board.nodeType.CPUCores*board.nodeType.CPUSpeed)->sum()
}
output Features {
Time : Long
Energy : Long
}
Processor {
Name: String
Version: String
}
MetamorphicRelations {
MR1 = [(( NNodes(m1) > NNodes(m2) ) and ((w1) == (w2)) ) implies ((Time(m1) <= Time(m2)))]
MR2 = [(( CPU(m1) > CPU(m2) ) and ((w1) == (w2)) ) implies ((Energy(m1) <= Energy(m2)))]
}
An mrDSL program for the cloud computing domain. MR1 states that, given the same workload, a data centre
with more nodes should not take longer to process it; MR2 relates computing power and energy consumption.
3Execute the metamorphic testing process
A dedicated wizard guides users through the MT process. The environment executes the test cases on the
domain processor, evaluates the defined MRs over the collected results, and produces a detailed report
identifying any violated relations and the test cases involved.
The Gotten wizard guiding the execution of the metamorphic testing process.
4Generate follow-up test cases with fowDSL
Gotten provides a second DSL, fowDSL, for the automated generation of follow-up test cases.
The generation method is based on
MOMoT. For each MR, a fowDSL program
specifies the permitted operations, such as increasing or decreasing numerical attributes or creating and
deleting objects. It also defines operation limits, the optimisation objective, and the search algorithms
to be applied.
A fowDSL program deriving follow-up data centre models from the source test cases by reducing the number
of boards and nodes, maximising the difference in nodes between the two models.
5Analyse the results
The environment collects and reports the test results. Users can inspect which MRs hold or fail for each
pair of test cases and then refine the relations, models, or generation strategies.
The Gotten development environment in action.
The same metamorphic testing approach applied to four domains.
Example domains
Cloud simulators
Evaluate performance-related relations across data centre models.
Explore relations involving CPU, storage, network, memory, energy consumption, and execution time.
Installing Gotten through the Eclipse Install New Software facility.
An academic research framework for model-driven engineering and software testing.
Research context
Authors and contributors
Gotten was developed within an academic research programme on the automated engineering of metamorphic
testing environments. The work involved researchers from the Universidad Autónoma de Madrid and the
Universidad Complutense de Madrid. The framework was developed by
Pablo Gómez-Abajo,
Pablo C. Cañizares,
Alberto Núñez,
Esther Guerra and
Juan de Lara.
Gotten uses Xtext to define its DSLs,
Henshin to specify model transformation
units, and MOMoT to generate follow-up
test cases through search-based techniques.
This work was funded by the Spanish Ministry of Science through project MASSIVE
(RTI2018-095255-B-I00) and by the Madrid R&D programme through project
FORTE
(P2018/TCS-4314).